1 #include "Local.h" /* standard header file */
3 /********************************************************************/
6 /* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
7 /* Date: 15 Sep 1994 */
8 /* Programmer: CARL MCCALLA */
11 /* Abstract: prtDMETR prints, in order of the ASOS METAR */
12 /* format, all non-initialized members of the structure */
13 /* addressed by the Decoded_METAR pointer. */
15 /* External Functions Called: */
18 /* Input: Mptr - ptr to a decoded_METAR structure. */
22 /* Modification History: */
25 /********************************************************************/
26 void prtDMETR( Decoded_METAR *Mptr )
29 /***************************/
30 /* DECLARE LOCAL VARIABLES */
31 /***************************/
35 /*************************/
36 /* START BODY OF ROUTINE */
37 /*************************/
39 printf("\n\n\n/*******************************************/\n");
40 printf("/* THE DECODED METAR REPORT FOLLOWS */\n");
41 printf("/*******************************************/\n\n");
43 if( Mptr->codeName[ 0 ] != '\0' )
44 printf("REPORT CODE NAME : %s\n",Mptr->codeName);
46 if( Mptr->stnid[ 0 ] != '\0' )
47 printf("STATION ID : %s\n",Mptr->stnid);
49 if( Mptr->ob_date != MAXINT )
50 printf("OBSERVATION DAY : %d\n",Mptr->ob_date);
52 if( Mptr->ob_hour != MAXINT )
53 printf("OBSERVATION HOUR : %d\n",Mptr->ob_hour);
55 if( Mptr->ob_minute != MAXINT )
56 printf("OBSERVATION MINUTE : %d\n",Mptr->ob_minute);
59 printf("NIL REPORT : TRUE\n");
62 printf("AUTO REPORT : TRUE\n");
65 printf("CORRECTED REPORT : TRUE\n");
67 if( Mptr->winData.windVRB )
68 printf("WIND DIRECTION VRB : TRUE\n");
70 if( Mptr->winData.windDir != MAXINT )
71 printf("WIND DIRECTION : %d\n",Mptr->winData.windDir);
73 if( Mptr->winData.windSpeed != MAXINT )
74 printf("WIND SPEED : %d\n",Mptr->winData.windSpeed);
76 if( Mptr->winData.windGust != MAXINT )
77 printf("WIND GUST : %d\n",Mptr->winData.windGust);
79 if( Mptr->winData.windUnits[ 0 ] != '\0' )
80 printf("WIND UNITS : %s\n",Mptr->winData.windUnits);
82 if( Mptr->minWnDir != MAXINT )
83 printf("MIN WIND DIRECTION : %d\n",Mptr->minWnDir);
85 if( Mptr->maxWnDir != MAXINT )
86 printf("MAX WIND DIRECTION : %d\n",Mptr->maxWnDir);
88 if( Mptr->prevail_vsbyM != (float) MAXINT )
89 printf("PREVAIL VSBY (M) : %f\n",Mptr->prevail_vsbyM);
91 if( Mptr->prevail_vsbyKM != (float) MAXINT )
92 printf("PREVAIL VSBY (KM) : %f\n",Mptr->prevail_vsbyKM);
94 if( Mptr->prevail_vsbySM != (float) MAXINT )
95 printf("PREVAIL VSBY (SM) : %.3f\n",Mptr->prevail_vsbySM);
97 if( Mptr->charPrevailVsby[0] != '\0' )
98 printf("PREVAIL VSBY (CHAR) : %s\n",Mptr->charPrevailVsby);
100 if( Mptr->vsby_Dir[ 0 ] != '\0' )
101 printf("VISIBILITY DIRECTION: %s\n",Mptr->vsby_Dir);
104 printf("RVRNO : TRUE\n");
106 for ( i = 0; i < 12; i++ )
108 if( Mptr->RRVR[i].runway_designator[0] != '\0' )
109 printf("RUNWAY DESIGNATOR : %s\n",
110 Mptr->RRVR[i].runway_designator);
112 if( Mptr->RRVR[i].visRange != MAXINT )
113 printf("R_WAY VIS RANGE (FT): %d\n",
114 Mptr->RRVR[i].visRange);
116 if( Mptr->RRVR[i].vrbl_visRange )
117 printf("VRBL VISUAL RANGE : TRUE\n");
119 if( Mptr->RRVR[i].below_min_RVR )
120 printf("BELOW MIN RVR : TRUE\n");
122 if( Mptr->RRVR[i].above_max_RVR )
123 printf("ABOVE MAX RVR : TRUE\n");
125 if( Mptr->RRVR[i].Max_visRange != MAXINT )
126 printf("MX R_WAY VISRNG (FT): %d\n",
127 Mptr->RRVR[i].Max_visRange);
129 if( Mptr->RRVR[i].Min_visRange != MAXINT )
130 printf("MN R_WAY VISRNG (FT): %d\n",
131 Mptr->RRVR[i].Min_visRange);
136 if( Mptr->DVR.visRange != MAXINT )
137 printf("DISPATCH VIS RANGE : %d\n",
140 if( Mptr->DVR.vrbl_visRange )
141 printf("VRBL DISPATCH VISRNG: TRUE\n");
143 if( Mptr->DVR.below_min_DVR )
144 printf("BELOW MIN DVR : TRUE\n");
146 if( Mptr->DVR.above_max_DVR )
147 printf("ABOVE MAX DVR : TRUE\n");
149 if( Mptr->DVR.Max_visRange != MAXINT )
150 printf("MX DSPAT VISRNG (FT): %d\n",
151 Mptr->DVR.Max_visRange);
153 if( Mptr->DVR.Min_visRange != MAXINT )
154 printf("MN DSPAT VISRNG (FT): %d\n",
155 Mptr->DVR.Min_visRange);
159 while ( Mptr->WxObstruct[i][0] != '\0' && i < MAXWXSYMBOLS )
161 printf("WX/OBSTRUCT VISION : %s\n",
162 Mptr->WxObstruct[i] );
166 if( Mptr->PartialObscurationAmt[0][0] != '\0' )
167 printf("OBSCURATION AMOUNT : %s\n",
168 &(Mptr->PartialObscurationAmt[0][0]));
170 if( Mptr->PartialObscurationPhenom[0][0] != '\0' )
171 printf("OBSCURATION PHENOM : %s\n",
172 &(Mptr->PartialObscurationPhenom[0][0]));
175 if( Mptr->PartialObscurationAmt[1][0] != '\0' )
176 printf("OBSCURATION AMOUNT : %s\n",
177 &(Mptr->PartialObscurationAmt[1][0]));
179 if( Mptr->PartialObscurationPhenom[1][0] != '\0' )
180 printf("OBSCURATION PHENOM : %s\n",
181 &(Mptr->PartialObscurationPhenom[1][0]));
184 while ( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' &&
187 if( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' )
188 printf("CLOUD COVER : %s\n",
189 Mptr->cldTypHgt[ i ].cloud_type);
191 if( Mptr->cldTypHgt[ i ].cloud_hgt_char[0] != '\0' )
192 printf("CLOUD HGT (CHARAC.) : %s\n",
193 Mptr->cldTypHgt[ i ].cloud_hgt_char);
195 if( Mptr->cldTypHgt[ i ].cloud_hgt_meters != MAXINT)
196 printf("CLOUD HGT (METERS) : %d\n",
197 Mptr->cldTypHgt[ i ].cloud_hgt_meters);
199 if( Mptr->cldTypHgt[ i ].other_cld_phenom[0] != '\0' )
200 printf("OTHER CLOUD PHENOM : %s\n",
201 Mptr->cldTypHgt[ i ].other_cld_phenom);
207 if( Mptr->temp != MAXINT )
208 printf("TEMP. (CELSIUS) : %d\n", Mptr->temp);
210 if( Mptr->dew_pt_temp != MAXINT )
211 printf("D.P. TEMP. (CELSIUS): %d\n", Mptr->dew_pt_temp);
213 if( Mptr->A_altstng )
214 printf("ALTIMETER (INCHES) : %.2f\n",
215 Mptr->inches_altstng );
217 if( Mptr->Q_altstng )
218 printf("ALTIMETER (PASCALS) : %d\n",
219 Mptr->hectoPasc_altstng );
221 if( Mptr->TornadicType[0] != '\0' )
222 printf("TORNADIC ACTVTY TYPE: %s\n",
223 Mptr->TornadicType );
225 if( Mptr->BTornadicHour != MAXINT )
226 printf("TORN. ACTVTY BEGHOUR: %d\n",
227 Mptr->BTornadicHour );
229 if( Mptr->BTornadicMinute != MAXINT )
230 printf("TORN. ACTVTY BEGMIN : %d\n",
231 Mptr->BTornadicMinute );
233 if( Mptr->ETornadicHour != MAXINT )
234 printf("TORN. ACTVTY ENDHOUR: %d\n",
235 Mptr->ETornadicHour );
237 if( Mptr->ETornadicMinute != MAXINT )
238 printf("TORN. ACTVTY ENDMIN : %d\n",
239 Mptr->ETornadicMinute );
241 if( Mptr->TornadicDistance != MAXINT )
242 printf("TORN. DIST. FROM STN: %d\n",
243 Mptr->TornadicDistance );
245 if( Mptr->TornadicLOC[0] != '\0' )
246 printf("TORNADIC LOCATION : %s\n",
249 if( Mptr->TornadicDIR[0] != '\0' )
250 printf("TORNAD. DIR FROM STN: %s\n",
253 if( Mptr->TornadicMovDir[0] != '\0' )
254 printf("TORNADO DIR OF MOVM.: %s\n",
255 Mptr->TornadicMovDir );
258 if( Mptr->autoIndicator[0] != '\0' )
259 printf("AUTO INDICATOR : %s\n",
260 Mptr->autoIndicator);
262 if( Mptr->PKWND_dir != MAXINT )
263 printf("PEAK WIND DIRECTION : %d\n",Mptr->PKWND_dir);
264 if( Mptr->PKWND_speed != MAXINT )
265 printf("PEAK WIND SPEED : %d\n",Mptr->PKWND_speed);
266 if( Mptr->PKWND_hour != MAXINT )
267 printf("PEAK WIND HOUR : %d\n",Mptr->PKWND_hour);
268 if( Mptr->PKWND_minute != MAXINT )
269 printf("PEAK WIND MINUTE : %d\n",Mptr->PKWND_minute);
271 if( Mptr->WshfTime_hour != MAXINT )
272 printf("HOUR OF WIND SHIFT : %d\n",Mptr->WshfTime_hour);
273 if( Mptr->WshfTime_minute != MAXINT )
274 printf("MINUTE OF WIND SHIFT: %d\n",Mptr->WshfTime_minute);
275 if( Mptr->Wshft_FROPA != FALSE )
276 printf("FROPA ASSOC. W/WSHFT: TRUE\n");
278 if( Mptr->TWR_VSBY != (float) MAXINT )
279 printf("TOWER VISIBILITY : %.2f\n",Mptr->TWR_VSBY);
280 if( Mptr->SFC_VSBY != (float) MAXINT )
281 printf("SURFACE VISIBILITY : %.2f\n",Mptr->SFC_VSBY);
283 if( Mptr->minVsby != (float) MAXINT )
284 printf("MIN VRBL_VIS (SM) : %.4f\n",Mptr->minVsby);
285 if( Mptr->maxVsby != (float) MAXINT )
286 printf("MAX VRBL_VIS (SM) : %.4f\n",Mptr->maxVsby);
288 if( Mptr->VSBY_2ndSite != (float) MAXINT )
289 printf("VSBY_2ndSite (SM) : %.4f\n",Mptr->VSBY_2ndSite);
290 if( Mptr->VSBY_2ndSite_LOC[0] != '\0' )
291 printf("VSBY_2ndSite LOC. : %s\n",
292 Mptr->VSBY_2ndSite_LOC);
296 printf("OCCASSIONAL LTG : TRUE\n");
299 printf("FREQUENT LIGHTNING : TRUE\n");
302 printf("CONTINUOUS LTG : TRUE\n");
305 printf("CLOUD-GROUND LTG : TRUE\n");
308 printf("IN-CLOUD LIGHTNING : TRUE\n");
311 printf("CLD-CLD LIGHTNING : TRUE\n");
314 printf("CLOUD-AIR LIGHTNING : TRUE\n");
317 printf("LIGHTNING AT AIRPORT: TRUE\n");
320 printf("LIGHTNING OVERHEAD : TRUE\n");
323 printf("DISTANT LIGHTNING : TRUE\n");
325 if( Mptr->LightningVCTS )
326 printf("L'NING W/I 5-10(ALP): TRUE\n");
328 if( Mptr->LightningTS )
329 printf("L'NING W/I 5 (ALP) : TRUE\n");
331 if( Mptr->VcyStn_LTG )
332 printf("VCY STN LIGHTNING : TRUE\n");
334 if( Mptr->LTG_DIR[0] != '\0' )
335 printf("DIREC. OF LIGHTNING : %s\n", Mptr->LTG_DIR);
340 while( i < 3 && Mptr->ReWx[ i ].Recent_weather[0] != '\0' )
342 printf("RECENT WEATHER : %s",
343 Mptr->ReWx[i].Recent_weather);
345 if( Mptr->ReWx[i].Bhh != MAXINT )
346 printf(" BEG_hh = %d",Mptr->ReWx[i].Bhh);
347 if( Mptr->ReWx[i].Bmm != MAXINT )
348 printf(" BEG_mm = %d",Mptr->ReWx[i].Bmm);
350 if( Mptr->ReWx[i].Ehh != MAXINT )
351 printf(" END_hh = %d",Mptr->ReWx[i].Ehh);
352 if( Mptr->ReWx[i].Emm != MAXINT )
353 printf(" END_mm = %d",Mptr->ReWx[i].Emm);
360 if( Mptr->minCeiling != MAXINT )
361 printf("MIN VRBL_CIG (FT) : %d\n",Mptr->minCeiling);
362 if( Mptr->maxCeiling != MAXINT )
363 printf("MAX VRBL_CIG (FT)) : %d\n",Mptr->maxCeiling);
365 if( Mptr->CIG_2ndSite_Meters != MAXINT )
366 printf("CIG2ndSite (FT) : %d\n",Mptr->CIG_2ndSite_Meters);
367 if( Mptr->CIG_2ndSite_LOC[0] != '\0' )
368 printf("CIG @ 2nd Site LOC. : %s\n",Mptr->CIG_2ndSite_LOC);
371 printf("PRESFR : TRUE\n");
373 printf("PRESRR : TRUE\n");
376 printf("SLPNO : TRUE\n");
378 if( Mptr->SLP != (float) MAXINT )
379 printf("SLP (hPa) : %.1f\n", Mptr->SLP);
381 if( Mptr->SectorVsby != (float) MAXINT )
382 printf("SECTOR VSBY (MILES) : %.2f\n", Mptr->SectorVsby );
384 if( Mptr->SectorVsby_Dir[ 0 ] != '\0' )
385 printf("SECTOR VSBY OCTANT : %s\n", Mptr->SectorVsby_Dir );
387 if( Mptr->TS_LOC[ 0 ] != '\0' )
388 printf("THUNDERSTORM LOCAT. : %s\n", Mptr->TS_LOC );
390 if( Mptr->TS_MOVMNT[ 0 ] != '\0' )
391 printf("THUNDERSTORM MOVMNT.: %s\n", Mptr->TS_MOVMNT);
394 printf("GR (HAILSTONES) : TRUE\n");
396 if( Mptr->GR_Size != (float) MAXINT )
397 printf("HLSTO SIZE (INCHES) : %.3f\n",Mptr->GR_Size);
400 printf("VIRGA : TRUE\n");
402 if( Mptr->VIRGA_DIR[0] != '\0' )
403 printf("DIR OF VIRGA FRM STN: %s\n", Mptr->VIRGA_DIR);
405 for( i = 0; i < 6; i++ ) {
406 if( Mptr->SfcObscuration[i][0] != '\0' )
407 printf("SfcObscuration : %s\n",
408 &(Mptr->SfcObscuration[i][0]) );
411 if( Mptr->Num8thsSkyObscured != MAXINT )
412 printf("8ths of SkyObscured : %d\n",Mptr->Num8thsSkyObscured);
415 printf("CIGNO : TRUE\n");
417 if( Mptr->Ceiling != MAXINT )
418 printf("Ceiling (ft) : %d\n",Mptr->Ceiling);
420 if( Mptr->Estimated_Ceiling != MAXINT )
421 printf("Estimated CIG (ft) : %d\n",Mptr->Estimated_Ceiling);
423 if( Mptr->VrbSkyBelow[0] != '\0' )
424 printf("VRB SKY COND BELOW : %s\n",Mptr->VrbSkyBelow);
426 if( Mptr->VrbSkyAbove[0] != '\0' )
427 printf("VRB SKY COND ABOVE : %s\n",Mptr->VrbSkyAbove);
429 if( Mptr->VrbSkyLayerHgt != MAXINT )
430 printf("VRBSKY COND HGT (FT): %d\n",Mptr->VrbSkyLayerHgt);
432 if( Mptr->ObscurAloftHgt != MAXINT )
433 printf("Hgt Obscur Aloft(ft): %d\n",Mptr->ObscurAloftHgt);
435 if( Mptr->ObscurAloft[0] != '\0' )
436 printf("Obscur Phenom Aloft : %s\n",Mptr->ObscurAloft);
438 if( Mptr->ObscurAloftSkyCond[0] != '\0' )
439 printf("Obscur ALOFT SKYCOND: %s\n",Mptr->ObscurAloftSkyCond);
443 printf("NOSPECI : TRUE\n");
446 printf("LAST : TRUE\n");
448 if( Mptr->synoptic_cloud_type[ 0 ] != '\0' )
449 printf("SYNOPTIC CLOUD GROUP: %s\n",Mptr->synoptic_cloud_type);
451 if( Mptr->CloudLow != '\0' )
452 printf("LOW CLOUD CODE : %c\n",Mptr->CloudLow);
454 if( Mptr->CloudMedium != '\0' )
455 printf("MEDIUM CLOUD CODE : %c\n",Mptr->CloudMedium);
457 if( Mptr->CloudHigh != '\0' )
458 printf("HIGH CLOUD CODE : %c\n",Mptr->CloudHigh);
460 if( Mptr->SNINCR != MAXINT )
461 printf("SNINCR (INCHES) : %d\n",Mptr->SNINCR);
463 if( Mptr->SNINCR_TotalDepth != MAXINT )
464 printf("SNINCR(TOT. INCHES) : %d\n",Mptr->SNINCR_TotalDepth);
466 if( Mptr->snow_depth_group[ 0 ] != '\0' )
467 printf("SNOW DEPTH GROUP : %s\n",Mptr->snow_depth_group);
469 if( Mptr->snow_depth != MAXINT )
470 printf("SNOW DEPTH (INCHES) : %d\n",Mptr->snow_depth);
472 if( Mptr->WaterEquivSnow != (float) MAXINT )
473 printf("H2O EquivSno(inches): %.2f\n",Mptr->WaterEquivSnow);
475 if( Mptr->SunshineDur != MAXINT )
476 printf("SUNSHINE (MINUTES) : %d\n",Mptr->SunshineDur);
478 if( Mptr->SunSensorOut )
479 printf("SUN SENSOR OUT : TRUE\n");
481 if( Mptr->hourlyPrecip != (float) MAXINT )
482 printf("HRLY PRECIP (INCHES): %.2f\n",Mptr->hourlyPrecip);
484 if( Mptr->precip_amt != (float) MAXINT)
485 printf("3/6HR PRCIP (INCHES): %.2f\n",
488 if( Mptr->Indeterminant3_6HrPrecip )
489 printf("INDTRMN 3/6HR PRECIP: TRUE\n");
491 if( Mptr->precip_24_amt != (float) MAXINT)
492 printf("24HR PRECIP (INCHES): %.2f\n",
493 Mptr->precip_24_amt);
495 if( Mptr->Temp_2_tenths != (float) MAXINT )
496 printf("TMP2TENTHS (CELSIUS): %.1f\n",Mptr->Temp_2_tenths);
498 if( Mptr->DP_Temp_2_tenths != (float) MAXINT )
499 printf("DPT2TENTHS (CELSIUS): %.1f\n",Mptr->DP_Temp_2_tenths);
501 if( Mptr->maxtemp != (float) MAXINT)
502 printf("MAX TEMP (CELSIUS) : %.1f\n",
505 if( Mptr->mintemp != (float) MAXINT)
506 printf("MIN TEMP (CELSIUS) : %.1f\n",
509 if( Mptr->max24temp != (float) MAXINT)
510 printf("24HrMAXTMP (CELSIUS): %.1f\n",
513 if( Mptr->min24temp != (float) MAXINT)
514 printf("24HrMINTMP (CELSIUS): %.1f\n",
517 if( Mptr->char_prestndcy != MAXINT)
518 printf("CHAR PRESS TENDENCY : %d\n",
519 Mptr->char_prestndcy );
521 if( Mptr->prestndcy != (float) MAXINT)
522 printf("PRES. TENDENCY (hPa): %.1f\n",
526 printf("PWINO : TRUE\n");
529 printf("PNO : TRUE\n");
532 printf("CHINO : TRUE\n");
534 if( Mptr->CHINO_LOC[0] != '\0' )
535 printf("CHINO_LOC : %s\n",Mptr->CHINO_LOC);
538 printf("VISNO : TRUE\n");
540 if( Mptr->VISNO_LOC[0] != '\0' )
541 printf("VISNO_LOC : %s\n",Mptr->VISNO_LOC);
544 printf("FZRANO : TRUE\n");
547 printf("TSNO : TRUE\n");
549 if( Mptr->DollarSign)
550 printf("DOLLAR $IGN INDCATR : TRUE\n");
552 if( Mptr->horiz_vsby[ 0 ] != '\0' )
553 printf("HORIZ VISIBILITY : %s\n",Mptr->horiz_vsby);
555 if( Mptr->dir_min_horiz_vsby[ 0 ] != '\0' )
556 printf("DIR MIN HORIZ VSBY : %s\n",Mptr->dir_min_horiz_vsby);
559 printf("CAVOK : TRUE\n");
562 if( Mptr->VertVsby != MAXINT )
563 printf("Vert. Vsby (meters) : %d\n",
566 if( Mptr->charVertVsby[0] != '\0' )
567 printf("Vert. Vsby (CHAR) : %s\n",
568 Mptr->charVertVsby );
570 if( Mptr->QFE != MAXINT )
571 printf("QFE : %d\n", Mptr->QFE);
574 printf("VOLCANIC ASH : TRUE\n");
576 if( Mptr->min_vrbl_wind_dir != MAXINT )
577 printf("MIN VRBL WIND DIR : %d\n",Mptr->min_vrbl_wind_dir);
578 if( Mptr->max_vrbl_wind_dir != MAXINT )
579 printf("MAX VRBL WIND DIR : %d\n",Mptr->max_vrbl_wind_dir);