]> git.mxchange.org Git - simgear.git/blob - simgear/metar/Metar.h
-Added .cvsignore files to clean up CVS messages
[simgear.git] / simgear / metar / Metar.h
1 #ifndef METARX
2 #define METARX
3  
4 /********************************************************************/
5 /*                                                                  */
6 /*  Title:         METAR H                                          */
7 /*  Organization:  W/OSO242 - GRAPHICS AND DISPLAY SECTION          */
8 /*  Date:          19 Jan 1996                                      */
9 /*  Programmer:    CARL MCCALLA                                     */
10 /*  Language:      C/370                                            */
11 /*                                                                  */
12 /*  Abstract:      METAR Decoder Header File.                       */
13 /*                                                                  */
14 /*  Modification History:                                           */
15 /*                 None.                                            */
16 /*                                                                  */
17 /********************************************************************/
18  
19  
20 #include "Local.h"     /* standard header file */
21  
22  
23 /*********************************************/
24 /*                                           */
25 /* RUNWAY VISUAL RANGE STRUCTURE DECLARATION */
26 /*       AND VARIABLE TYPE DEFINITION        */
27 /*                                           */
28 /*********************************************/
29  
30 typedef struct runway_VisRange {
31    char runway_designator[6];
32    bool vrbl_visRange;
33    bool below_min_RVR;
34    bool above_max_RVR;
35    int  visRange;
36    int  Max_visRange;
37    int  Min_visRange;
38 }  Runway_VisRange;
39  
40 /***********************************************/
41 /*                                             */
42 /* DISPATCH VISUAL RANGE STRUCTURE DECLARATION */
43 /*       AND VARIABLE TYPE DEFINITION          */
44 /*                                             */
45 /***********************************************/
46  
47 typedef struct dispatch_VisRange {
48    bool vrbl_visRange;
49    bool below_min_DVR;
50    bool above_max_DVR;
51    int  visRange;
52    int  Max_visRange;
53    int  Min_visRange;
54 }  Dispatch_VisRange;
55  
56 /*****************************************/
57 /*                                       */
58 /* CLOUD CONDITION STRUCTURE DECLARATION */
59 /*      AND VARIABLE TYPE DEFINITION     */
60 /*                                       */
61 /*****************************************/
62  
63 typedef struct cloud_Conditions {
64    char cloud_type[5];
65    char cloud_hgt_char[4];
66    char other_cld_phenom[4];
67    int  cloud_hgt_meters;
68 }  Cloud_Conditions;
69  
70 /*****************************************/
71 /*                                       */
72 /* WIND GROUP DATA STRUCTURE DECLARATION */
73 /*      AND VARIABLE TYPE DEFINITION     */
74 /*                                       */
75 /*****************************************/
76  
77 typedef struct windstruct {
78    char windUnits[ 4 ];
79    bool windVRB;
80    int windDir;
81    int windSpeed;
82    int windGust;
83 } WindStruct;
84  
85 /*****************************************/
86 /*                                       */
87 /* RECENT WX GROUP STRUCTURE DECLARATION */
88 /*      AND VARIABLE TYPE DEFINITION     */
89 /*                                       */
90 /*****************************************/
91  
92 typedef struct recent_wx {
93    char Recent_weather[ 5 ];
94    int  Bhh;
95    int  Bmm;
96    int  Ehh;
97    int  Emm;
98 } Recent_Wx;
99  
100 /***************************************/
101 /*                                     */
102 /* DECODED METAR STRUCTURE DECLARATION */
103 /*     AND VARIABLE TYPE DEFINITION    */
104 /*                                     */
105 /***************************************/
106  
107 typedef struct decoded_METAR {
108    char synoptic_cloud_type[ 6 ];
109    char snow_depth_group[ 6 ];
110    char codeName[ 6 ];
111    char stnid[5];
112    char horiz_vsby[5];
113    char dir_min_horiz_vsby[3];
114    char vsby_Dir[ 3 ];
115    char WxObstruct[10][8];
116    char autoIndicator[5];
117    char VSBY_2ndSite_LOC[10];
118    char SKY_2ndSite_LOC[10];
119    char SKY_2ndSite[10];
120    char SectorVsby_Dir[ 3 ];
121    char ObscurAloft[ 12 ];
122    char ObscurAloftSkyCond[ 12 ];
123    char VrbSkyBelow[ 4 ];
124    char VrbSkyAbove[ 4 ];
125    char LTG_DIR[ 3 ];
126    char CloudLow;
127    char CloudMedium;
128    char CloudHigh;
129    char CIG_2ndSite_LOC[10];
130    char VIRGA_DIR[3];
131    char TornadicType[15];
132    char TornadicLOC[10];
133    char TornadicDIR[4];
134    char TornadicMovDir[3];
135    char CHINO_LOC[6];
136    char VISNO_LOC[6];
137    char PartialObscurationAmt[2][7];
138    char PartialObscurationPhenom[2][12];
139    char SfcObscuration[6][10];
140    char charPrevailVsby[12];
141    char charVertVsby[10];
142    char TS_LOC[3];
143    char TS_MOVMNT[3];
144  
145    bool Indeterminant3_6HrPrecip;
146    bool CIGNO;
147    bool SLPNO;
148    bool ACFTMSHP;
149    bool NOSPECI;
150    bool FIRST;
151    bool LAST;
152    bool SunSensorOut;
153    bool AUTO;
154    bool COR;
155    bool NIL_rpt;
156    bool CAVOK;
157    bool RVRNO;
158    bool A_altstng;
159    bool Q_altstng;
160    bool VIRGA;
161    bool VOLCASH;
162    bool GR;
163    bool CHINO;
164    bool VISNO;
165    bool PNO;
166    bool PWINO;
167    bool FZRANO;
168    bool TSNO;
169    bool DollarSign;
170    bool PRESRR;
171    bool PRESFR;
172    bool Wshft_FROPA;
173    bool OCNL_LTG;
174    bool FRQ_LTG;
175    bool CNS_LTG;
176    bool CG_LTG;
177    bool IC_LTG;
178    bool CC_LTG;
179    bool CA_LTG;
180    bool DSNT_LTG;
181    bool AP_LTG;
182    bool VcyStn_LTG;
183    bool OVHD_LTG;
184    bool LightningVCTS;
185    bool LightningTS;
186  
187    int  TornadicDistance;
188    int  ob_hour;
189    int  ob_minute;
190    int  ob_date;
191    int minWnDir;
192    int maxWnDir;
193    int VertVsby;
194    int temp;
195    int dew_pt_temp;
196    int QFE;
197    int hectoPasc_altstng;
198    int char_prestndcy;
199    int minCeiling;
200    int maxCeiling;
201    int WshfTime_hour;
202    int WshfTime_minute;
203    int min_vrbl_wind_dir;
204    int max_vrbl_wind_dir;
205    int PKWND_dir;
206    int PKWND_speed;
207    int PKWND_hour;
208    int PKWND_minute;
209    int SKY_2ndSite_Meters;
210    int Ceiling;
211    int Estimated_Ceiling;
212    int SNINCR;
213    int SNINCR_TotalDepth;
214    int SunshineDur;
215    int ObscurAloftHgt;
216    int VrbSkyLayerHgt;
217    int Num8thsSkyObscured;
218    int CIG_2ndSite_Meters;
219    int snow_depth;
220    int BTornadicHour;
221    int BTornadicMinute;
222    int ETornadicHour;
223    int ETornadicMinute;
224  
225  
226    float SectorVsby;
227    float WaterEquivSnow;
228    float VSBY_2ndSite;
229    float prevail_vsbySM;
230    float prevail_vsbyM;
231    float prevail_vsbyKM;
232    float prestndcy;
233    float precip_amt;
234    float precip_24_amt;
235    float maxtemp;
236    float mintemp;
237    float max24temp;
238    float min24temp;
239    float minVsby;
240    float maxVsby;
241    float hourlyPrecip;
242    float TWR_VSBY;
243    float SFC_VSBY;
244    float Temp_2_tenths;
245    float DP_Temp_2_tenths;
246    float SLP;
247    float GR_Size;
248  
249    double inches_altstng;
250  
251    Runway_VisRange RRVR[12];
252    Dispatch_VisRange DVR;
253    Recent_Wx ReWx[3];
254    WindStruct winData;
255    Cloud_Conditions cldTypHgt[6];
256  
257 }  Decoded_METAR;
258  
259 #define MAXWXSYMBOLS 10       /*-- NOT TO EXCEED 10 PRES. WX GRPS --*/
260 #define MAXTOKENS    500      /*--  RPT NOT TO EXCEED 500 GRPS   --*/
261  
262 void prtDMETR( Decoded_METAR *Mptr );
263 int DcdMETAR( char *string, Decoded_METAR *Mptr );
264  
265 #endif