]> Pileus Git - ~andy/rsl/blob - africa.h
RSL v1.44
[~andy/rsl] / africa.h
1 /*
2     NASA/TRMM, Code 910.1.
3     This is the TRMM Office Radar Software Library.
4     Copyright (C) 1997
5             John H. Merritt
6             Space Applications Corporation
7             Vienna, Virginia
8
9     This library is free software; you can redistribute it and/or
10     modify it under the terms of the GNU Library General Public
11     License as published by the Free Software Foundation; either
12     version 2 of the License, or (at your option) any later version.
13
14     This library is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17     Library General Public License for more details.
18
19     You should have received a copy of the GNU Library General Public
20     License along with this library; if not, write to the Free
21     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 typedef struct {
25   unsigned short
26     yearjday,       /* Year * 512 + Julian day. */
27         hour,           /* Hour. */
28         minute_sec,     /* Minute * 60 + seconds. */
29         bcd_start_azim, /* BCD code for start of azimuth. */
30         bcd_end_azim,   /* BCD code for end of azimuth. */
31         raycount,       /* Raycount + elstep * 512. Set to 0 for last ray of ppi */
32         bcd_azimuth,    /* BCD code for azimuth. */
33         bcd_elevation,  /* BCD code for elevation. */
34         mds,            /* Minumum detectable signal (MDS). */
35     mus,            /* Minumum usable signal (MUS). */
36         rvpc_high,
37     rvpc_low,       /* High and low level, in RVPC units. */
38         phi,            /* PHI - RVPC high level in dbm * 32. */
39         plo,            /* PLO - RVPC high level in dbm * 32. */
40         xmit_power_site,     /* Transimitter Power * 32 + Site number. */
41         skip_width_azim_avg, /* Skip + Bin width * 256 +
42                                                   * Azimuth Averaging Factor * 4096.
43                                                   */
44         bin[224],            /* RVPC COUNT for range bin[1..224] */
45         notused[256-241+1];  /* Not used. */
46 } Africa_buffer;
47
48 typedef Africa_buffer Africa_ray;
49
50 typedef struct {
51   int nrays;
52   Africa_ray **ray; /* 0..nrays-1 of Africa_rays */
53 } Africa_sweep;
54
55
56 typedef struct {
57   int nsweeps;
58   Africa_sweep **sweep; /*0..nsweeps-1 of Africa_sweeps */
59 } Africa_volume;
60
61 /* Prototype routine definitions */
62
63 int africa_read_buffer(FILE *fp, Africa_buffer *buffer);
64 float africa_bcd_convert(unsigned short bcd);
65 Africa_sweep * africa_new_sweep(int nray);
66 Africa_ray *africa_new_ray(void);
67 void africa_free_ray(Africa_ray *r);
68 void africa_free_sweep(Africa_sweep *s);
69 Africa_sweep *africa_read_sweep(FILE *fp);