Christopher Young 2016-06-14 10:28:31 -04:00
rodzic 9ae8ff93a2
commit de89ee301a
12 zmienionych plików z 12510 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,382 @@
/* ref: http://limulus.net/mdsplib */
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/********************************************************************/
/* */
/* Title: metar.h */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 19 Jan 1996 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: METAR Decoder Header File. */
/* */
/* Modification History: */
/* 7 Jul 2001 by Eric McCarthy: Made suitable for */
/* use as header for the metar.a library. */
/* */
/********************************************************************/
/* Used in the METAR structs. */
typedef unsigned short int MDSP_BOOL;
/*********************************************/
/* */
/* RUNWAY VISUAL RANGE STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*********************************************/
typedef struct runway_VisRange {
char runway_designator[6];
MDSP_BOOL vrbl_visRange;
MDSP_BOOL below_min_RVR;
MDSP_BOOL above_max_RVR;
int visRange;
int Max_visRange;
int Min_visRange;
} Runway_VisRange;
/***********************************************/
/* */
/* DISPATCH VISUAL RANGE STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/***********************************************/
typedef struct dispatch_VisRange {
MDSP_BOOL vrbl_visRange;
MDSP_BOOL below_min_DVR;
MDSP_BOOL above_max_DVR;
int visRange;
int Max_visRange;
int Min_visRange;
} Dispatch_VisRange;
/*****************************************/
/* */
/* CLOUD CONDITION STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct cloud_Conditions {
char cloud_type[5];
char cloud_hgt_char[4];
char other_cld_phenom[4];
int cloud_hgt_meters;
} Cloud_Conditions;
/*****************************************/
/* */
/* WIND GROUP DATA STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct windstruct {
char windUnits[ 4 ];
MDSP_BOOL windVRB;
int windDir;
int windSpeed;
int windGust;
} WindStruct;
/*****************************************/
/* */
/* RECENT WX GROUP STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct recent_wx {
char Recent_weather[ 5 ];
int Bhh;
int Bmm;
int Ehh;
int Emm;
} Recent_Wx;
/***************************************/
/* */
/* DECODED METAR STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/***************************************/
typedef struct decoded_METAR {
char synoptic_cloud_type[ 6 ];
char snow_depth_group[ 6 ];
char codeName[ 6 ];
char stnid[5];
char horiz_vsby[5];
char dir_min_horiz_vsby[3];
char vsby_Dir[ 3 ];
char WxObstruct[10][8];
char autoIndicator[5];
char VSBY_2ndSite_LOC[10];
char SKY_2ndSite_LOC[10];
char SKY_2ndSite[10];
char SectorVsby_Dir[ 3 ];
char ObscurAloft[ 12 ];
char ObscurAloftSkyCond[ 12 ];
char VrbSkyBelow[ 4 ];
char VrbSkyAbove[ 4 ];
char LTG_DIR[ 3 ];
char CloudLow;
char CloudMedium;
char CloudHigh;
char CIG_2ndSite_LOC[10];
char VIRGA_DIR[3];
char TornadicType[15];
char TornadicLOC[10];
char TornadicDIR[4];
char TornadicMovDir[3];
char CHINO_LOC[6];
char VISNO_LOC[6];
char PartialObscurationAmt[2][7];
char PartialObscurationPhenom[2][12];
char SfcObscuration[6][10];
char charPrevailVsby[12];
char charVertVsby[10];
char TS_LOC[3];
char TS_MOVMNT[3];
MDSP_BOOL Indeterminant3_6HrPrecip;
MDSP_BOOL Indeterminant_24HrPrecip;
MDSP_BOOL CIGNO;
MDSP_BOOL SLPNO;
MDSP_BOOL ACFTMSHP;
MDSP_BOOL NOSPECI;
MDSP_BOOL FIRST;
MDSP_BOOL LAST;
MDSP_BOOL SunSensorOut;
MDSP_BOOL AUTO;
MDSP_BOOL COR;
MDSP_BOOL NIL_rpt;
MDSP_BOOL CAVOK;
MDSP_BOOL RVRNO;
MDSP_BOOL A_altstng;
MDSP_BOOL Q_altstng;
MDSP_BOOL VIRGA;
MDSP_BOOL VOLCASH;
MDSP_BOOL GR;
MDSP_BOOL CHINO;
MDSP_BOOL VISNO;
MDSP_BOOL PNO;
MDSP_BOOL PWINO;
MDSP_BOOL FZRANO;
MDSP_BOOL TSNO;
MDSP_BOOL DollarSign;
MDSP_BOOL PRESRR;
MDSP_BOOL PRESFR;
MDSP_BOOL Wshft_FROPA;
MDSP_BOOL OCNL_LTG;
MDSP_BOOL FRQ_LTG;
MDSP_BOOL CNS_LTG;
MDSP_BOOL CG_LTG;
MDSP_BOOL IC_LTG;
MDSP_BOOL CC_LTG;
MDSP_BOOL CA_LTG;
MDSP_BOOL DSNT_LTG;
MDSP_BOOL AP_LTG;
MDSP_BOOL VcyStn_LTG;
MDSP_BOOL OVHD_LTG;
MDSP_BOOL LightningVCTS;
MDSP_BOOL LightningTS;
int TornadicDistance;
int ob_hour;
int ob_minute;
int ob_date;
int minWnDir;
int maxWnDir;
int VertVsby;
int temp;
int dew_pt_temp;
int QFE;
int hectoPasc_altstng;
int char_prestndcy;
int minCeiling;
int maxCeiling;
int WshfTime_hour;
int WshfTime_minute;
int min_vrbl_wind_dir;
int max_vrbl_wind_dir;
int PKWND_dir;
int PKWND_speed;
int PKWND_hour;
int PKWND_minute;
int SKY_2ndSite_Meters;
int Ceiling;
int Estimated_Ceiling;
int SNINCR;
int SNINCR_TotalDepth;
int SunshineDur;
int ObscurAloftHgt;
int VrbSkyLayerHgt;
int Num8thsSkyObscured;
int CIG_2ndSite_Meters;
int snow_depth;
int BTornadicHour;
int BTornadicMinute;
int ETornadicHour;
int ETornadicMinute;
float SectorVsby;
float WaterEquivSnow;
float VSBY_2ndSite;
float prevail_vsbySM;
float prevail_vsbyM;
float prevail_vsbyKM;
float prestndcy;
float precip_amt;
float precip_24_amt;
float maxtemp;
float mintemp;
float max24temp;
float min24temp;
float minVsby;
float maxVsby;
float hourlyPrecip;
float TWR_VSBY;
float SFC_VSBY;
float Temp_2_tenths;
float DP_Temp_2_tenths;
float SLP;
float GR_Size;
double inches_altstng;
Runway_VisRange RRVR[12];
Dispatch_VisRange DVR;
Recent_Wx ReWx[3];
WindStruct winData;
Cloud_Conditions cldTypHgt[6];
} Decoded_METAR;
/********************************************************************/
/* */
/* Title: DcdMETAR */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 14 Sep 1994 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: DcdMETAR takes a pointer to a METAR report char- */
/* acter string as input, decodes the report, and */
/* puts the individual decoded/parsed groups into */
/* a structure that has the variable type */
/* Decoded_METAR. */
/* */
/* Input: string - a pointer to a METAR report character */
/* string. */
/* */
/* Output: Mptr - a pointer to a structure that has the */
/* variable type Decoded_METAR. */
/* */
/* Modification History: */
/* 3 Jul 2001 by Eric McCarthy: Added stringCpy */
/* so cosnt char *'s could be passed in. */
/* */
/********************************************************************/
int DcdMETAR( char *string , Decoded_METAR *Mptr );
/********************************************************************/
/* */
/* Title: prtDMETR */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 15 Sep 1994 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: prtDMETR prints, in order of the ASOS METAR */
/* format, all non-initialized members of the structure */
/* addressed by the Decoded_METAR pointer. */
/* */
/* External Functions Called: */
/* None. */
/* */
/* Input: Mptr - ptr to a decoded_METAR structure. */
/* */
/* Output: NONE */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
void prtDMETR( Decoded_METAR *Mptr );
/********************************************************************/
/* */
/* Title: dcdNetMETAR */
/* Date: 24 Jul 2001 */
/* Programmer: Eric McCarthy */
/* Language: C */
/* */
/* Abstract: dcdNetMETAR */
/* The METARs supplied by the NWS server need to */
/* be reformatted before they can be sent through */
/* dcdMETAR. This calls dcdMETAR on the correctly */
/* formated METAR. */
/* */
/* Input: a pointer to a METAR string from a NWS server */
/* */
/* Output: Mptr - a pointer to a structure that has the */
/* variable type Decoded_METAR. */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
int dcdNetMETAR (char *string, Decoded_METAR *Mptr);
/********************************************************************/
/* */
/* Title: sprint_metar */
/* Date: 24 Jul 2001 */
/* Programmer: Eric McCarthy */
/* Language: C */
/* */
/* Abstract: sprtDMETR */
/* Does what prtDMETR does, but into a string. */
/* */
/* Input: string containing the printout, decoded METAR */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
void sprint_metar( char *string, Decoded_METAR *Mptr );

Wyświetl plik

@ -0,0 +1,92 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma comment(compiler)
#pragma comment(date)
#pragma comment(timestamp)
#include <stdlib.h>
#pragma title("antoi - char array to integer")
#pragma pagesize (80)
#pragma page(1)
/********************************************************************/
/* */
/* Title: antoi */
/* Date: Jan 28, 1991 */
/* Organization: W/OSO242 - Graphics and Display Section */
/* Programmer: Allan Darling */
/* Language: C/370 */
/* */
/* Abstract: This function will convert a character array */
/* (string) of length (len) into an integer. */
/* The integer is created via a call to the */
/* function atoi. This function extends the */
/* functionality of atoi by removing the */
/* requirement for a sentinal delimited string */
/* as input. */
/* */
/* Input: - Pointer to an array of characters. */
/* - Integer indicating the number of character to include */
/* in the conversion. */
/* */
/* Output:- An integer corresponding to the value in the character */
/* array or MAXNEG (-2147483648) if the function is */
/* unable to acquire system storage. */
/* */
/* Modification History: */
/* None */
/* */
/********************************************************************/
int antoi(char * string, int len)
{
/*******************/
/* local variables */
/*******************/
char * tmpstr;
int i,
retval;
/*****************/
/* function body */
/*****************/
tmpstr = malloc((len+1) * sizeof(char));
if (tmpstr == NULL) return (-2147483648);
for (i = 0; i < len; i++)
tmpstr[i] = string[i];
tmpstr[len] = '\0';
retval = atoi(tmpstr);
free(tmpstr);
return(retval);
} /* end antoi */
#pragma page(1)

Wyświetl plik

@ -0,0 +1,191 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma comment (compiler)
#pragma comment (date)
#pragma comment (timestamp)
#pragma pagesize(80)
#include "local.h" /* standard header file */
#pragma subtitle(" ")
#pragma page(1)
#pragma subtitle("charcmp - characters compare with patterns ")
/********************************************************************/
/* */
/* Title: charcmp */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 12 Dec 1995 */
/* Programmer: CINDY L. CHONG */
/* Language: C/370 */
/* */
/* Abstract: This function will compare each character in the */
/* string match with each character in the pattern */
/* which is made up of characters. The str can */
/* be longer than the pattern. */
/* */
/* External Functions Called: */
/* None. */
/* */
/* Input: str is a pointer to char */
/* pattern is a pointer to char */
/* */
/* Output: Return true if str matches pattern, */
/* otherwise, return false */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#pragma page(1)
MDSP_BOOL charcmp(char *str, char *pattern)
{
/**********************************************************/
/* Loop while str and pattern is not equal to null, then */
/* inscreases str and pattern by one */
/**********************************************************/
for (; *pattern != '\0'; pattern++)
{
if (*str == '\0')
return FALSE;
/************************************************************/
/* If pattern match str, then increase str and jump out the */
/* case and read next char of the str and pattern */
/************************************************************/
if ( isspace(*pattern) )
pattern = nxtalpha(pattern);
switch( *pattern )
{
case 'c':
if ( !isalnum(*str++) )
{
return FALSE;
}
break;
case 'a':
if ( !isalpha(*str) )
{
return FALSE;
}
str++;
break;
case 'n':
if ( !iscntrl(*str++) )
{
return FALSE;
}
break;
case 'd':
if ( !isdigit(*str) )
{
return FALSE;
}
str++;
break;
case 'g':
if ( !isgraph(*str++) )
{
return FALSE;
}
break;
case 'i':
if ( !islower(*str++) )
{
return FALSE;
}
break;
case 'p':
if ( !isprint(*str++) )
{
return FALSE;
}
break;
case 't':
if ( !ispunct(*str++) )
{
return FALSE;
}
break;
case 'w':
if ( !isspace(*str++) )
{
return FALSE;
}
break;
case 'u':
if ( !isupper(*str++) )
{
return FALSE;
}
break;
case 's':
if (*str++ != ' ')
{
return FALSE;
}
break;
case 'm':
if ( !isspace(*str) )
{
return FALSE;
}
else
{
while ( isspace(*str) )
str++;
}
break;
case '\'':
pattern++;
if (*pattern != *str)
{
return FALSE;
}
pattern++;
str++;
break;
default:
return FALSE;
} /* end switch */
} /* end for */
return (TRUE);
}

Wyświetl plik

@ -0,0 +1,685 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "metar_structs.h"
#ifdef SYNOPTIC
char *BldSynop( Decoded_METAR * , char * );
/*char *Sec0MeSm(Decoded_METAR *);*/
/*char *Sec1MeSm(Decoded_METAR *, char *);*/
/*char *Sec3MeSm(Decoded_METAR *, char *);*/
/*char *Sec5MeSm(Decoded_METAR *, char *);*/
#endif
void prtDMETR( Decoded_METAR *);
int DcdMETAR( char *, Decoded_METAR * );
#pragma page(1)
#pragma subtitle(" ")
#pragma subtitle("subtitle - description ")
/********************************************************************/
/* */
/* Title: dRVMETAR */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 28 Oct 1994 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: DRVMETAR is a main routine that acts a driver */
/* for testing the METAR Decoder function. */
/* */
/* External Functions Called: */
/* None. */
/* DcdMETAR */
/* prtDcdMetar */
/* Sec0MTSm */
/* Sec1MTSm */
/* */
/* Input: None */
/* */
/* Output: None */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#pragma page(1)
main()
{
static char *string[] =
{
"KMKG 18022G29KT 3SM BR BKN018 BR 24/22 A2995 RMK A02 VIS 2",
"KPIT 132351Z 33013KT 4SM +TSRA BR BKN018CB OVC031 12/11 A2977 RMK "
"AO2 PK WND 31041/2305 WSHFT 2300 PRESSRR SLP090 FRQ LTGCGCC OHD "
"TS OHD MOV E CB OHD MOV E 8/3// P0051 60052 T01170111 10222 20122 "
"53030",
"KCAK 132351Z 28016G22KT 10SM BKN021 OVC030 11/09 A2981 RMK AO2 "
"TSE00RAE10 PRESRR SLP093 TS MOV NE CIG RGD 8/5// P0002 60066 "
"T01110094 10217 20111 51053",
"KBUF 132354Z 21007KT 3SM +TSRA BR FEW009 OVC 12/11 A2959 RMK "
"AO2 PRESFR SLP021 8/9// TS ALQDS MOV E OCNL LTGICCCCG P0031 "
"60073 T01170111 10233 20111 50000 0",
"KPIT 132356Z 32012G21KT 4SM TSRA BR BKN018CB OVC031 12/11 A2978 "
"RMK AO2 WSHFT 2338 PRESFR FRQ LTGCGCC OHD TS OHD MOV E CB OHD MOV "
"E P0001",
"KCAK 132358Z 28015G22KT 10SM BKN013 OVC023 11/10 A2982 RMK AO2",
"KBUF 140001Z 22008KT 3SM +TSRA BR BKN009 BKN013 OVC022 12/12 A2959 "
"RMK AO2 P0003",
"KRIL 031853Z AUTO 33008KT 10SM SCT022 BKN032 OVC060 07/01 A3004 "
"RMK AO2 SLP157 T00720006 TSNO",
"METAR KCLE 091657Z COR 35021KT 3SM -PL SHPL VV004 M03/M04 A2964 "
"RMK VIS S M1/4=",
"METAR KCLE 091657Z COR 35021KT 3SM -PE SHPE VV004 M03/M04 A2964 "
"RMK VIS S M1/4=",
"METAR KCLE 091657Z COR 35021KT 3SM -PE TSPL VV004 M03/M04 A2964 "
"RMK VIS S M1/4=",
"METAR KCLE 091657Z COR 35021KT 3SM -PL TSPE VV004 M03/M04 A2964 "
"RMK VIS S M1/4=",
"KMLB 200450Z 18006KT 7SM OVC100 23/22 A2986 RMK FQT LTGIG W-N",
"KMLB 200450Z 18006KT 7SM OVC100 23/22 A2986 RMK FQT LTGIG W-N=",
"KMLB 200450Z 18006KT 7SM OVC100 23/22 A2986 RMK FRQ LTGIC NW",
"KMLB 200450Z 18006KT 7SM OVC100 23/22 A2986 RMK FRQ LTGCC NW=",
"SPECI KEKO 151609Z 00000KT 5SM BR FEW003 SCT013 M04/M06 A3018 "
"RMK VIS N-NE M1/4",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/MM A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M12 A2992",
"METAR KLAX 281156Z AUTO VRB100G135KT 130V210 3 9999 "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
"+TS VCTS FEW/// SCT000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
"TORNADO B13 DSNT NE A01 PK WND 18515/45 "
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"VIS 2 1/2 RWY11 "
"DVR/1000V1600FT "
"SHRAB05E30SHSNB20E55 FZDZB1057E1059 CIG 1000V1500 CIG 020 RWY11 "
"PRESFR PRESRR SLP013 FG FEW/// HZ SCT000 VIS NW 2 1/2 GR 3/4 "
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
"933125 98096 P0125 60225 70565 "
"T00261015 10369 21026 "
"404800360 52101 VISNO RWY05 CHINO RWY27 PNO RVRNO "
"PWINO FZRANO TSNO $",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2 "
"PWINO FZRANO TSNO $",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2 1/2 "
"PWINO FZRANO TSNO $",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2 1/2=",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK CIG 003V026 SLP046 ESTMD SLP VIS SW-NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK VIS S 2",
"SPECI KEKO 151609Z 00000KT 5SM BR FEW003 SCT013 M04/M06 A3018 "
"RMK VIS N-NE 1",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/MM A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M12 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/MM A2992",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK CIG 003V026 SLP046 ESTMD SLP VIS SW-NW 2=",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK VIS S 2=",
"SPECI KEKO 151609Z 00000KT 5SM BR FEW003 SCT013 M04/M06 A3018 "
"RMK VIS N-NE 1=",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW-NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK CIG 003V026 SLP046 ESTMD SLP VIS SW-NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK VIS S 2",
"SPECI KEKO 151609Z 00000KT 5SM BR FEW003 SCT013 M04/M06 A3018 "
"RMK VIS N-NE 1",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK SLP046 ESTMD SLP VIS SW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK CIG 003V026 SLP046 ESTMD SLP VIS NW 2",
"METAR KAFF 091657Z COR 35021KT 3SM -SG BR VV004 M03/M04 A2964 "
"RMK VIS S 2",
"SPECI KEKO 151609Z 00000KT 5SM BR FEW003 SCT013 M04/M06 A3018 "
"RMK VIS NE 1",
"KPIT 1935Z 22015G25KT 1/8SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/12 A2992",
"KPIT 1935Z 22015G25KT 6SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M12/M18 A2992",
"KPIT 1935Z 22015G25KT 8SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/12 A2992",
"KPIT 1935Z 22015G25KT 9SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/M01 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005TCU BKN010ACSL OVC250CB MM/12 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/MM A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M12 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/MM A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/MM A2992",
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
"A2900 RMK A02A PK WND 18056/28 OCNL LTG AP "
"RAB15E25TSB20 FCB1430 PRESFR "
"SLP 701 P 0254 T01990182",
"METAR KLAX 281156Z AUTO VRB100G135KT 130V210 3 9999 "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
"+TS VCTS FEW/// SCT000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
"TORNADO B13 DSNT NE A01 PK WND 18515/45 "
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"VIS 2 1/2 RWY11 "
"DVR/1000V1600FT "
"SHRAB05E30SHSNB20E55 FZDZB1057E1059 CIG 1000V1500 CIG 020 RWY11 "
"PRESFR PRESRR SLP013 FG FEW/// HZ SCT000 VIS NW 2 1/2 GR 3/4 "
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
"933125 98096 P0125 60225 70565 "
"T00261015 10369 21026 "
"404800360 52101 VISNO RWY05 CHINO RWY27 PNO RVRNO "
"PWINO FZRANO TSNO $",
"KP88 1919Z 09001KT 14/03 RMK AO / PKWND 002/RNO 158 Z T01440034",
"K40B 1924Z 29004KT 15/M07 RMK AO PKWND 011/RM MV263 T01501072",
"SPECI KGFI 041430Z COR 18045G56KT "
"M1/4SM R15/0200FT R01L/0600V1000FT R01L/M0600FT R27/P6000FT "
"+FC +TS -FZDZ VV010 04/M02 "
"A2900 RMK TORNADO B13 6 NE A02A PK WND 18056/28 WSHFT 30 FROPA "
"TWR VIS 1 1/2 VIS NE 2 1/2 VIS 2 1/2 RWY11 DVR/0600V1000FT "
"OCNL LTGICCG OVHD RAB15E25 TSB20 FCB1430 TS SE MOV NE GR 1 3/4 "
"VIRGA SW CIG 005V010 FG SCT000 BKN014 V OVC CB DSNT W "
"CIG 002 RWY11 PRESFR PRESRR "
"SLP701 ACFT MSHP NOSPECI SNINCR 2/10 FIRST "
"P0254 60217 70125 4/021 933036 8/903 98096 T00261015 "
"11021 21001 401120084 52032RVRNO PWINO PNO FZRANO TSNO "
"VISNO RWY06 CHINO RWY12 $",
"KPHX 281156Z 12004KT 16KM CLR 15/05 A2996 RMK AOA SLP135 T01500050 "
"10250 20150 53006",
"KFCA 281156Z 30003KT 10SM CLR 06/02 A3009 RMRK AO TNO $ SLP191 "
"T00610023 10167 20056 53003",
"KAST 281156Z 00000KT 10SM BKN095 09/08 A2997 REMARK AOA SLP150 "
"T00940084 10161 20094 52005 ",
"KHVR 281156Z 03003KT 10SM OVC020 09/07 A3010 REMARKS AO TNO ZRNO "
"$ SLP194 T00940073 10156 20089 51005",
"KGGW 281156Z 35006KT 5SM BR OVC010 10/09 A3003 RMK AOA $ SLP177 "
"70003 T01000095 10156 20110 53008",
"KELY 1153Z AUTO 14004KT 10SM SCT075 01/M01 A3011 RMK AOA TNO ZRNO "
"SLP171 70001 T00061011 10139 21006 51005",
"KFLG 281156Z 29006KT 10SM CLR 04/M01 A3012 RMK AO TNO SLP147 "
"T00391011 21006 51004",
"KGTF 281156Z 27005KT 7SM BKN080 04/04 A3010 RMK AOA SLP205 "
"T00440045 10117 20039 51006",
"KHLN 281156Z AUTO 27005KT 10SM OVC023 07/05 A3011 RMK AOA OVC V "
"BKN $ SLP202 60000 70001 T00670050 10122 20061 53003",
"K13A 1918Z 20011KT 26/M06 RMK AO PKWND 020/RNO 644V264 T02611061",
"KGGW 1756Z 33018KT 10SM OVC015 M03/M06 A3041 RMK AOA SLP338 "
"4/007 60002 T10281055 11028 21072 51009",
"KPHX 1756Z 130004KT 10SM CLR 18/M03 A3001 RMK AOA SLP154 "
"T01781033 10178 20067 58007",
"KFCA 1756Z 29005KT 10SM CLR 05/M11 A3049 RMK AOA TNO SLP352 "
"T00501111 10050 21044 50004",
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 "
"T01110045 10111 20000 50002",
"KHVR 1756Z 31007KT 5SM -SN SCT011 BKN024 OVC030 M05/M08 A3056 "
"RMK AOA 933004 "
"BKN V SCT TNO P0000 $ SLP389 4/015 60002 "
"T10501077 11050 21078 51010",
"KELY 1753Z 34010KT 10SM CLR 01/M07 A3022 RMK AOA TNO FZRNO "
"SLP240 T00111066 10011 21078 58007",
"KFLG 1756Z 07006KT 10SM CLR 06/M12 A3009 RMK AO TNO FZRNO "
"SLP178 T00561122 10061 21100 58005",
"KGTF 1756Z 35010KT 1/2SM -SN FG VV09 M06/M08 A3051 RMK AOA "
"933004 SFC VSBY 3/4 "
"P0009 SLP393 60010 T10611077 11044 21067 53013",
"KHLN 1756Z 35012KT 10SM SCT032 OVC060 M02/M09 A3048 RMK AOA "
"SLP369 60000 T10171094 11017 21061 53006",
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 61104 "
"71235 T01110045 10111 20000 401720056 58002",
"METAR KLAX 04281156Z AUTO VRB100G135KT 130V210 3 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
"+TS BLPY FEW000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
"TORNADO B13 DSNT NE A02 PK WND 18515/45 "
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"VIS 2 1/2 RWY11 OCNL LTG VCY STN "
"RAB1030E1145 FZDZE56 BLPYE57 CIG 1000V1500 CIG 020 RWY11 "
"PRESFR PRESRR SLP013 FG FEW000 VIS NW2 1/2 GR 3/4 "
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
"933125 98096 P0125 60225 70565 "
"T00261015 10369 21026 "
"404800360 52101 PWINO FZRANO TSNO $",
"METAR KGFI 041356Z AUTO 17012KT 130V210 3 1/2SM R15L/0500FT -RA "
"SCT050 OVC110 26/18 A2991 RMK FUNNEL CLOUDS A02 RAB30 "
"SLP 101 GR M1/4 VIRGA SCT V BKN P 0010 T02640178",
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 "
"RMK WATERSPOUTS VCY STN NW A02 SLP 101 10288 20243 52021 $ ",
"SPECI KGFI 041420Z AUTO 18030KT 3 1/2SM RVRNO TS -RA BKN008 OVC060 "
"26/22 A2991 RMK A02 RA15TSB20 PRESFR SLP 101 P 0000 T02640218",
"KABE 281900Z NIL",
"METAR KPIT NIL",
"METAR KCLE 04281156Z 170100G135KT 110V180 M1/4SM "
"R01L/P6000FT +TSSHRA VCFG "
"BKN025 SCT100 OVC200 M26/ A2991 RMK PK WND 18515/45 A02 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"CIG 1000V1500 PRESFR FRQ LTG CG NW "
"RAB1030E1145 FZDZE56 PRESRR SLP135 GS "
"T1263 "
"VIRGA NW 8/365 4/178 P 0125 60225 7//// 70565 10369 21026 "
"404800360 52101 PWINO FZRANO TSNO $",
"METAR KPHL 040256Z AUTO 170100G135KT 130V210 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 LTG DSNT "
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP037 GR 2 3/4 "
"VIRGA E 8/365 4/178 P 0125 70565 21026 T0263 10369 60225 "
"404800360 52101 PWINO FZRANO TSNO $",
"SPECI KGFI 041420Z AUTO 18030KT 2 1/2SM RVRNO TS -RA BKN008 "
"OVC060 25/22 A2991 RMK A02 LTG DSNT W "
"RAB15TSB20 PRESFR SLP101 P 0000 "
"254/218",
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR M1/4 "
"VIRGA SE 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
"404800360 52101 PWINO FZRANO TSNO $",
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
"VIRGA 35 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
"VIRGA 35 8/365 4/178 P 0125 21026 70565 10369 60225 T0263 21026 "
"404800360 52101 PWINO FZRANO TSNO $",
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 18515/45 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
"404800360 52101 PWINO FZRANO TSNO $",
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 185150/1345 "
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
"404800360 52101 PWINO FZRANO TSNO",
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 RMK "
"A02 SLP 101 10288 20243 52021",
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
"SLP 701 P 0254 M199/M182",
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
"SLP 701 P 0254 M199/182",
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
"SLP 701 P 0254 199/M182",
"METAR APIT 171755Z AUTO 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 4/369 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 8/563 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1 1/2V2 SLP875 SGB1213E1225",
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK SLP056 "
"RAE0123",
"SPECI APIT 171755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 8/321 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1 SLP875 FGB1713",
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1V2 SLP875",
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2 SLP875",
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1V2 1/2 SLP875",
"EGPF 1720Z 00000KT 9999 -SHRA STC014 SCT020CB BNK024 12/09 "
"Q1003 NOSIG",
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
"DAAT 1830Z 30010KT CAVOK 29/06 Q1019",
"GQPP 1800Z 34023KT 3000 DRSA SKC 24/20 Q1011 NSG",
"DAAG 1830Z 06006KT 9999 SCT020 25/22 Q1015",
"DABB 1830Z 04010KT 9999 SCT030TCU SCT033CB 27/18 Q1017",
"DABC 1830Z 00000KT 9999 SCT026TCU SCT036CB 22/18 Q1020 RETS",
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK K",
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
"GFLL 1900Z NIL",
"GOOY 1800Z 03006G17KT 340V080 6000 TSRA BKN016 BKN030CB "
"BKN133 26/23 Q1013 NOSIG",
"GCXO 1930Z 32018KT 8000 SCT003 SCT007 18/16 Q1019",
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1 1/2V2",
"BPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1V2",
"CPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1V2 1/2",
"DPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2",
"EPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 1/2V3/4",
"FPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 3/4V2 1/2",
"GPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
"SFC VIS 1 1/2 VIS 3/4V3",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/M16 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/16 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/M16 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M16 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/16 A2992",
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/MM A2992",
NULL};
/***************************/
/* DECLARE LOCAL VARIABLES */
/***************************/
Decoded_METAR Metar;
Decoded_METAR *Mptr = &Metar;
int j,
ErReturn;
static char *synopRTRN = NULL;
char bltn_prefix[20];
/***************************************************/
/* START BODY OF MAIN ROUTINE FOR CALLING DcdMETAR */
/***************************************************/
j = 0;
while( string[j] != NULL)
{
/*-- PRINT INPUT METAR REPORT ----------------------------*/
printf("\n\nINPUT METAR REPORT:\n\n %s\n\n",string[j] );
/*-- DECODE INPUT REPORT ---------------------------------*/
if ( (ErReturn = DcdMETAR( string[ j ], Mptr )) != 0 )
printf("DcdMETAR: Error Return Number: %d\n",ErReturn);
/*-- PRINT DECODED METAR REPORT ELEMENTS -----------------*/
printf("\n\nFINAL DECODED PRODUCT...\n\n");
prtDMETR( Mptr );
#ifdef OLDSTUFF
/************************************************/
/* Convert Decoded METAR into Synoptic format */
/************************************************/
printf("Just after call to prtDMETR\n");
sprintf( bltn_prefix, "AAXX YYGGi##," );
synopRTRN = BldSynop( Mptr, bltn_prefix );
printf("After BldSynop, SynopRep =:\n%s\n",synopRTRN);
/**********************************************************/
/*-- ENCODE SECTION 0 OF THE SYNTHETIC SYNOPTIC REPORT ---*/
/**********************************************************/
printf("Just before call to Sec0MeSM\n");
if( (synopRTRN = Sec0MeSm( Mptr )) == NULL )
printf("Sec0MeSm returned a NULL pointer\n");
else
printf("After Sec0MeSm: %s\n",synopRTRN);
/**********************************************************/
/*-- ENCODE SECTION 1 OF THE SYNTHETIC SYNOPTIC REPORT ---*/
/**********************************************************/
if( synopRTRN != NULL )
synopRTRN = Sec1MeSm( Mptr,synopRTRN );
printf("After Sec1MeSm: %s\n",synopRTRN);
/**********************************************************/
/*-- ENCODE SECTION 3 OF THE SYNTHETIC SYNOPTIC REPORT ---*/
/**********************************************************/
if( synopRTRN != NULL )
synopRTRN = Sec3MeSm( Mptr,synopRTRN );
printf("After Sec3MeSm: %s\n",synopRTRN);
/**********************************************************/
/*-- ENCODE SECTION 5 OF THE SYNTHETIC SYNOPTIC REPORT ---*/
/**********************************************************/
if( synopRTRN != NULL )
synopRTRN = Sec5MeSm( Mptr,synopRTRN);
printf("After Sec5MeSm: %s\n",synopRTRN);
/**********************************************************/
/*-- PRINT THE ENCODED SYNTHETIC SYNOPTIC REPORT ---------*/
/**********************************************************/
if( synopRTRN != NULL ) {
printf("\n\nOutput Synoptic Report: %s\n\n",synopRTRN);
free( synopRTRN);
}
#endif
j++;
}
}

Wyświetl plik

@ -0,0 +1,84 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "metar_structs.h"
#pragma subtitle(" ")
#pragma page(1)
#pragma subtitle("subtitle - description ")
/********************************************************************/
/* */
/* Title: fracPart */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 13 Jun 1995 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: Convert a character string fraction into a */
/* decimal (floating point) number. */
/* */
/* External Functions Called: */
/* None. */
/* */
/* Input: string - a pointer to a character string frac- */
/* tion. */
/* Output: A decimal (floating point) number. */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#pragma page(1)
float fracPart( char *string )
{
/***************************/
/* DECLARE LOCAL VARIABLES */
/***************************/
char buf[ 6 ],
*slash;
float numerator,
denominator;
/*************************/
/* START BODY OF ROUTINE */
/*************************/
slash = strchr(string, '/');
memset(buf , '\0', 6);
strncpy( buf, string, slash-string);
numerator = (float) atoi(buf);
memset(buf , '\0', 6);
strcpy( buf, slash+1);
denominator = (float) atoi(buf);
if( denominator == 0.0 )
return ((float) MAXINT);
else
return (numerator/denominator);
}

Wyświetl plik

@ -0,0 +1,283 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef METARX
#define METARX
/********************************************************************/
/* */
/* Title: METAR H */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 19 Jan 1996 */
/* Programmer: CARL MCCALLA */
/* Language: C/370 */
/* */
/* Abstract: METAR Decoder Header File. */
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#include "local.h" /* standard header file */
/*********************************************/
/* */
/* RUNWAY VISUAL RANGE STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*********************************************/
typedef struct runway_VisRange {
char runway_designator[6];
MDSP_BOOL vrbl_visRange;
MDSP_BOOL below_min_RVR;
MDSP_BOOL above_max_RVR;
int visRange;
int Max_visRange;
int Min_visRange;
} Runway_VisRange;
/***********************************************/
/* */
/* DISPATCH VISUAL RANGE STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/***********************************************/
typedef struct dispatch_VisRange {
MDSP_BOOL vrbl_visRange;
MDSP_BOOL below_min_DVR;
MDSP_BOOL above_max_DVR;
int visRange;
int Max_visRange;
int Min_visRange;
} Dispatch_VisRange;
/*****************************************/
/* */
/* CLOUD CONDITION STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct cloud_Conditions {
char cloud_type[5];
char cloud_hgt_char[4];
char other_cld_phenom[4];
int cloud_hgt_meters;
} Cloud_Conditions;
/*****************************************/
/* */
/* WIND GROUP DATA STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct windstruct {
char windUnits[ 4 ];
MDSP_BOOL windVRB;
int windDir;
int windSpeed;
int windGust;
} WindStruct;
/*****************************************/
/* */
/* RECENT WX GROUP STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/*****************************************/
typedef struct recent_wx {
char Recent_weather[ 5 ];
int Bhh;
int Bmm;
int Ehh;
int Emm;
} Recent_Wx;
/***************************************/
/* */
/* DECODED METAR STRUCTURE DECLARATION */
/* AND VARIABLE TYPE DEFINITION */
/* */
/***************************************/
typedef struct decoded_METAR {
char synoptic_cloud_type[ 6 ];
char snow_depth_group[ 6 ];
char codeName[ 6 ];
char stnid[5];
char horiz_vsby[5];
char dir_min_horiz_vsby[3];
char vsby_Dir[ 3 ];
char WxObstruct[10][8];
char autoIndicator[5];
char VSBY_2ndSite_LOC[10];
char SKY_2ndSite_LOC[10];
char SKY_2ndSite[10];
char SectorVsby_Dir[ 3 ];
char ObscurAloft[ 12 ];
char ObscurAloftSkyCond[ 12 ];
char VrbSkyBelow[ 4 ];
char VrbSkyAbove[ 4 ];
char LTG_DIR[ 3 ];
char CloudLow;
char CloudMedium;
char CloudHigh;
char CIG_2ndSite_LOC[10];
char VIRGA_DIR[3];
char TornadicType[15];
char TornadicLOC[10];
char TornadicDIR[4];
char TornadicMovDir[3];
char CHINO_LOC[6];
char VISNO_LOC[6];
char PartialObscurationAmt[2][7];
char PartialObscurationPhenom[2][12];
char SfcObscuration[6][10];
char charPrevailVsby[12];
char charVertVsby[10];
char TS_LOC[3];
char TS_MOVMNT[3];
MDSP_BOOL Indeterminant3_6HrPrecip;
MDSP_BOOL Indeterminant_24HrPrecip;
MDSP_BOOL CIGNO;
MDSP_BOOL SLPNO;
MDSP_BOOL ACFTMSHP;
MDSP_BOOL NOSPECI;
MDSP_BOOL FIRST;
MDSP_BOOL LAST;
MDSP_BOOL SunSensorOut;
MDSP_BOOL AUTO;
MDSP_BOOL COR;
MDSP_BOOL NIL_rpt;
MDSP_BOOL CAVOK;
MDSP_BOOL RVRNO;
MDSP_BOOL A_altstng;
MDSP_BOOL Q_altstng;
MDSP_BOOL VIRGA;
MDSP_BOOL VOLCASH;
MDSP_BOOL GR;
MDSP_BOOL CHINO;
MDSP_BOOL VISNO;
MDSP_BOOL PNO;
MDSP_BOOL PWINO;
MDSP_BOOL FZRANO;
MDSP_BOOL TSNO;
MDSP_BOOL DollarSign;
MDSP_BOOL PRESRR;
MDSP_BOOL PRESFR;
MDSP_BOOL Wshft_FROPA;
MDSP_BOOL OCNL_LTG;
MDSP_BOOL FRQ_LTG;
MDSP_BOOL CNS_LTG;
MDSP_BOOL CG_LTG;
MDSP_BOOL IC_LTG;
MDSP_BOOL CC_LTG;
MDSP_BOOL CA_LTG;
MDSP_BOOL DSNT_LTG;
MDSP_BOOL AP_LTG;
MDSP_BOOL VcyStn_LTG;
MDSP_BOOL OVHD_LTG;
MDSP_BOOL LightningVCTS;
MDSP_BOOL LightningTS;
int TornadicDistance;
int ob_hour;
int ob_minute;
int ob_date;
int minWnDir;
int maxWnDir;
int VertVsby;
int temp;
int dew_pt_temp;
int QFE;
int hectoPasc_altstng;
int char_prestndcy;
int minCeiling;
int maxCeiling;
int WshfTime_hour;
int WshfTime_minute;
int min_vrbl_wind_dir;
int max_vrbl_wind_dir;
int PKWND_dir;
int PKWND_speed;
int PKWND_hour;
int PKWND_minute;
int SKY_2ndSite_Meters;
int Ceiling;
int Estimated_Ceiling;
int SNINCR;
int SNINCR_TotalDepth;
int SunshineDur;
int ObscurAloftHgt;
int VrbSkyLayerHgt;
int Num8thsSkyObscured;
int CIG_2ndSite_Meters;
int snow_depth;
int BTornadicHour;
int BTornadicMinute;
int ETornadicHour;
int ETornadicMinute;
float SectorVsby;
float WaterEquivSnow;
float VSBY_2ndSite;
float prevail_vsbySM;
float prevail_vsbyM;
float prevail_vsbyKM;
float prestndcy;
float precip_amt;
float precip_24_amt;
float maxtemp;
float mintemp;
float max24temp;
float min24temp;
float minVsby;
float maxVsby;
float hourlyPrecip;
float TWR_VSBY;
float SFC_VSBY;
float Temp_2_tenths;
float DP_Temp_2_tenths;
float SLP;
float GR_Size;
double inches_altstng;
Runway_VisRange RRVR[12];
Dispatch_VisRange DVR;
Recent_Wx ReWx[3];
WindStruct winData;
Cloud_Conditions cldTypHgt[6];
} Decoded_METAR;
#define MAXWXSYMBOLS 10 /*-- NOT TO EXCEED 10 PRES. WX GRPS --*/
#define MAXTOKENS 500 /*-- RPT NOT TO EXCEED 500 GRPS --*/
#endif

Wyświetl plik

@ -0,0 +1,912 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "metar_structs.h"
void sprint_metar (char * string, Decoded_METAR *Mptr)
{
/***************************/
/* DECLARE LOCAL VARIABLES */
/***************************/
int i;
char temp[100];
/*************************/
/* START BODY OF ROUTINE */
/*************************/
sprintf(string, "\n\n\n/*******************************************/\n");
strcat(string, "/* THE DECODED METAR REPORT FOLLOWS */\n");
strcat(string, "/*******************************************/\n\n");
if ( Mptr->codeName[ 0 ] != '\0' ) {
sprintf(temp, "REPORT CODE NAME : %s\n",Mptr->codeName);
strcat(string, temp);
}
if ( Mptr->stnid[ 0 ] != '\0' ) {
sprintf(temp, "STATION ID : %s\n",Mptr->stnid);
strcat(string, temp);
}
if ( Mptr->ob_date != MAXINT ) {
sprintf(temp, "OBSERVATION DAY : %d\n",Mptr->ob_date);
strcat(string, temp);
}
if ( Mptr->ob_hour != MAXINT ) {
sprintf(temp, "OBSERVATION HOUR : %d\n",Mptr->ob_hour);
strcat(string, temp);
}
if ( Mptr->ob_minute != MAXINT ) {
sprintf(temp, "OBSERVATION MINUTE : %d\n",Mptr->ob_minute);
strcat(string, temp);
}
if ( Mptr->NIL_rpt ) {
sprintf(temp, "NIL REPORT : TRUE\n");
strcat(string, temp);
}
if ( Mptr->AUTO ) {
sprintf(temp, "AUTO REPORT : TRUE\n");
strcat(string, temp);
}
if ( Mptr->COR ) {
sprintf(temp, "CORRECTED REPORT : TRUE\n");
strcat(string, temp);
}
if ( Mptr->winData.windVRB ) {
sprintf(temp, "WIND DIRECTION VRB : TRUE\n");
strcat(string, temp);
}
if ( Mptr->winData.windDir != MAXINT ) {
sprintf(temp, "WIND DIRECTION : %d\n",Mptr->winData.windDir);
strcat(string, temp);
}
if ( Mptr->winData.windSpeed != MAXINT ) {
sprintf(temp, "WIND SPEED : %d\n",Mptr->winData.windSpeed);
strcat(string, temp);
}
if ( Mptr->winData.windGust != MAXINT ) {
sprintf(temp, "WIND GUST : %d\n",Mptr->winData.windGust);
strcat(string, temp);
}
if ( Mptr->winData.windUnits[ 0 ] != '\0' ) {
sprintf(temp, "WIND UNITS : %s\n",Mptr->winData.windUnits);
strcat(string, temp);
}
if ( Mptr->minWnDir != MAXINT ) {
sprintf(temp, "MIN WIND DIRECTION : %d\n",Mptr->minWnDir);
strcat(string, temp);
}
if ( Mptr->maxWnDir != MAXINT ) {
sprintf(temp, "MAX WIND DIRECTION : %d\n",Mptr->maxWnDir);
strcat(string, temp);
}
if ( Mptr->prevail_vsbyM != (float) MAXINT ) {
sprintf(temp, "PREVAIL VSBY (M) : %f\n",Mptr->prevail_vsbyM);
strcat(string, temp);
}
if ( Mptr->prevail_vsbyKM != (float) MAXINT ) {
sprintf(temp, "PREVAIL VSBY (KM) : %f\n",Mptr->prevail_vsbyKM);
strcat(string, temp);
}
if ( Mptr->prevail_vsbySM != (float) MAXINT ) {
sprintf(temp, "PREVAIL VSBY (SM) : %.3f\n",Mptr->prevail_vsbySM);
strcat(string, temp);
}
/*
if ( Mptr->charPrevailVsby[0] != '\0' ) {
sprintf(temp, "PREVAIL VSBY (CHAR) : %s\n",Mptr->charPrevailVsby);
strcat(string, temp);
}
*/
if ( Mptr->vsby_Dir[ 0 ] != '\0' ) {
sprintf(temp, "VISIBILITY DIRECTION: %s\n",Mptr->vsby_Dir);
strcat(string, temp);
}
if ( Mptr->RVRNO ) {
sprintf(temp, "RVRNO : TRUE\n");
strcat(string, temp);
}
for ( i = 0; i < 12; i++ )
{
if( Mptr->RRVR[i].runway_designator[0] != '\0' ) {
sprintf(temp, "RUNWAY DESIGNATOR : %s\n",
Mptr->RRVR[i].runway_designator);
strcat(string, temp);
}
if( Mptr->RRVR[i].visRange != MAXINT ) {
sprintf(temp, "R_WAY VIS RANGE (FT): %d\n",
Mptr->RRVR[i].visRange);
strcat(string, temp);
}
if ( Mptr->RRVR[i].vrbl_visRange ) {
sprintf(temp, "VRBL VISUAL RANGE : TRUE\n");
strcat(string, temp);
}
if ( Mptr->RRVR[i].below_min_RVR ) {
sprintf(temp, "BELOW MIN RVR : TRUE\n");
strcat(string, temp);
}
if ( Mptr->RRVR[i].above_max_RVR ) {
sprintf(temp, "ABOVE MAX RVR : TRUE\n");
strcat(string, temp);
}
if( Mptr->RRVR[i].Max_visRange != MAXINT ) {
sprintf(temp, "MX R_WAY VISRNG (FT): %d\n",
Mptr->RRVR[i].Max_visRange);
strcat(string, temp);
}
if( Mptr->RRVR[i].Min_visRange != MAXINT ) {
sprintf(temp, "MN R_WAY VISRNG (FT): %d\n",
Mptr->RRVR[i].Min_visRange);
strcat(string, temp);
}
}
if( Mptr->DVR.visRange != MAXINT ) {
sprintf(temp, "DISPATCH VIS RANGE : %d\n",
Mptr->DVR.visRange);
strcat(string, temp);
}
if ( Mptr->DVR.vrbl_visRange ) {
sprintf(temp, "VRBL DISPATCH VISRNG: TRUE\n");
strcat(string, temp);
}
if ( Mptr->DVR.below_min_DVR ) {
sprintf(temp, "BELOW MIN DVR : TRUE\n");
strcat(string, temp);
}
if ( Mptr->DVR.above_max_DVR ) {
sprintf(temp, "ABOVE MAX DVR : TRUE\n");
strcat(string, temp);
}
if( Mptr->DVR.Max_visRange != MAXINT ) {
sprintf(temp, "MX DSPAT VISRNG (FT): %d\n",
Mptr->DVR.Max_visRange);
strcat(string, temp);
}
if( Mptr->DVR.Min_visRange != MAXINT ) {
sprintf(temp, "MN DSPAT VISRNG (FT): %d\n",
Mptr->DVR.Min_visRange);
strcat(string, temp);
}
i = 0;
while ( Mptr->WxObstruct[i][0] != '\0' && i < MAXWXSYMBOLS )
{
sprintf(temp, "WX/OBSTRUCT VISION : %s\n",
Mptr->WxObstruct[i] );
strcat(string, temp);
i++;
}
if ( Mptr->PartialObscurationAmt[0][0] != '\0' ) {
sprintf(temp, "OBSCURATION AMOUNT : %s\n",
&(Mptr->PartialObscurationAmt[0][0]));
strcat(string, temp);
}
if ( Mptr->PartialObscurationPhenom[0][0] != '\0' ) {
sprintf(temp, "OBSCURATION PHENOM : %s\n",
&(Mptr->PartialObscurationPhenom[0][0]));
strcat(string, temp);
}
if ( Mptr->PartialObscurationAmt[1][0] != '\0' ) {
sprintf(temp, "OBSCURATION AMOUNT : %s\n",
&(Mptr->PartialObscurationAmt[1][0]));
strcat(string, temp);
}
if ( Mptr->PartialObscurationPhenom[1][0] != '\0' ) {
sprintf(temp, "OBSCURATION PHENOM : %s\n",
&(Mptr->PartialObscurationPhenom[1][0]));
strcat(string, temp);
}
i = 0;
while ( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' &&
i < 6 )
{
if ( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' ) {
sprintf(temp, "CLOUD COVER : %s\n",
Mptr->cldTypHgt[ i ].cloud_type);
strcat(string, temp);
}
if ( Mptr->cldTypHgt[ i ].cloud_hgt_char[0] != '\0' ) {
sprintf(temp, "CLOUD HGT (CHARAC.) : %s\n",
Mptr->cldTypHgt[ i ].cloud_hgt_char);
strcat(string, temp);
}
if ( Mptr->cldTypHgt[ i ].cloud_hgt_meters != MAXINT) {
sprintf(temp, "CLOUD HGT (METERS) : %d\n",
Mptr->cldTypHgt[ i ].cloud_hgt_meters);
strcat(string, temp);
}
if ( Mptr->cldTypHgt[ i ].other_cld_phenom[0] != '\0' ) {
sprintf(temp, "OTHER CLOUD PHENOM : %s\n",
Mptr->cldTypHgt[ i ].other_cld_phenom);
strcat(string, temp);
}
i++;
}
if ( Mptr->temp != MAXINT ) {
sprintf(temp, "TEMP. (CELSIUS) : %d\n", Mptr->temp);
strcat(string, temp);
}
if ( Mptr->dew_pt_temp != MAXINT ) {
sprintf(temp, "D.P. TEMP. (CELSIUS): %d\n", Mptr->dew_pt_temp);
strcat(string, temp);
}
if ( Mptr->A_altstng ) {
sprintf(temp, "ALTIMETER (INCHES) : %.2f\n",
Mptr->inches_altstng );
strcat(string, temp);
}
if ( Mptr->Q_altstng ) {
sprintf(temp, "ALTIMETER (PASCALS) : %d\n",
Mptr->hectoPasc_altstng );
strcat(string, temp);
}
if ( Mptr->TornadicType[0] != '\0' ) {
sprintf(temp, "TORNADIC ACTVTY TYPE: %s\n",
Mptr->TornadicType );
strcat(string, temp);
}
if ( Mptr->BTornadicHour != MAXINT ) {
sprintf(temp, "TORN. ACTVTY BEGHOUR: %d\n",
Mptr->BTornadicHour );
strcat(string, temp);
}
if ( Mptr->BTornadicMinute != MAXINT ) {
sprintf(temp, "TORN. ACTVTY BEGMIN : %d\n",
Mptr->BTornadicMinute );
strcat(string, temp);
}
if ( Mptr->ETornadicHour != MAXINT ) {
sprintf(temp, "TORN. ACTVTY ENDHOUR: %d\n",
Mptr->ETornadicHour );
strcat(string, temp);
}
if ( Mptr->ETornadicMinute != MAXINT ) {
sprintf(temp, "TORN. ACTVTY ENDMIN : %d\n",
Mptr->ETornadicMinute );
strcat(string, temp);
}
if ( Mptr->TornadicDistance != MAXINT ) {
sprintf(temp, "TORN. DIST. FROM STN: %d\n",
Mptr->TornadicDistance );
strcat(string, temp);
}
if ( Mptr->TornadicLOC[0] != '\0' ) {
sprintf(temp, "TORNADIC LOCATION : %s\n",
Mptr->TornadicLOC );
strcat(string, temp);
}
if ( Mptr->TornadicDIR[0] != '\0' ) {
sprintf(temp, "TORNAD. DIR FROM STN: %s\n",
Mptr->TornadicDIR );
strcat(string, temp);
}
if ( Mptr->TornadicMovDir[0] != '\0' ) {
sprintf(temp, "TORNADO DIR OF MOVM.: %s\n",
Mptr->TornadicMovDir );
strcat(string, temp);
}
if ( Mptr->autoIndicator[0] != '\0' ) {
sprintf(temp, "AUTO INDICATOR : %s\n",
Mptr->autoIndicator);
strcat(string, temp);
}
if ( Mptr->PKWND_dir != MAXINT ) {
sprintf(temp, "PEAK WIND DIRECTION : %d\n",Mptr->PKWND_dir);
strcat(string, temp);
}
if ( Mptr->PKWND_speed != MAXINT ) {
sprintf(temp, "PEAK WIND SPEED : %d\n",Mptr->PKWND_speed);
strcat(string, temp);
}
if ( Mptr->PKWND_hour != MAXINT ) {
sprintf(temp, "PEAK WIND HOUR : %d\n",Mptr->PKWND_hour);
strcat(string, temp);
}
if ( Mptr->PKWND_minute != MAXINT ) {
sprintf(temp, "PEAK WIND MINUTE : %d\n",Mptr->PKWND_minute);
strcat(string, temp);
}
if ( Mptr->WshfTime_hour != MAXINT ) {
sprintf(temp, "HOUR OF WIND SHIFT : %d\n",Mptr->WshfTime_hour);
strcat(string, temp);
}
if ( Mptr->WshfTime_minute != MAXINT ) {
sprintf(temp, "MINUTE OF WIND SHIFT: %d\n",Mptr->WshfTime_minute);
strcat(string, temp);
}
if ( Mptr->Wshft_FROPA != FALSE ) {
sprintf(temp, "FROPA ASSOC. W/WSHFT: TRUE\n");
strcat(string, temp);
}
if ( Mptr->TWR_VSBY != (float) MAXINT ) {
sprintf(temp, "TOWER VISIBILITY : %.2f\n",Mptr->TWR_VSBY);
strcat(string, temp);
}
if ( Mptr->SFC_VSBY != (float) MAXINT ) {
sprintf(temp, "SURFACE VISIBILITY : %.2f\n",Mptr->SFC_VSBY);
strcat(string, temp);
}
if ( Mptr->minVsby != (float) MAXINT ) {
sprintf(temp, "MIN VRBL_VIS (SM) : %.4f\n",Mptr->minVsby);
strcat(string, temp);
}
if ( Mptr->maxVsby != (float) MAXINT ) {
sprintf(temp, "MAX VRBL_VIS (SM) : %.4f\n",Mptr->maxVsby);
strcat(string, temp);
}
if( Mptr->VSBY_2ndSite != (float) MAXINT ) {
sprintf(temp, "VSBY_2ndSite (SM) : %.4f\n",Mptr->VSBY_2ndSite);
strcat(string, temp);
}
if( Mptr->VSBY_2ndSite_LOC[0] != '\0' ) {
sprintf(temp, "VSBY_2ndSite LOC. : %s\n",
Mptr->VSBY_2ndSite_LOC);
strcat(string, temp);
}
if ( Mptr->OCNL_LTG ) {
sprintf(temp, "OCCASSIONAL LTG : TRUE\n");
strcat(string, temp);
}
if ( Mptr->FRQ_LTG ) {
sprintf(temp, "FREQUENT LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CNS_LTG ) {
sprintf(temp, "CONTINUOUS LTG : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CG_LTG ) {
sprintf(temp, "CLOUD-GROUND LTG : TRUE\n");
strcat(string, temp);
}
if ( Mptr->IC_LTG ) {
sprintf(temp, "IN-CLOUD LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CC_LTG ) {
sprintf(temp, "CLD-CLD LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CA_LTG ) {
sprintf(temp, "CLOUD-AIR LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->AP_LTG ) {
sprintf(temp, "LIGHTNING AT AIRPORT: TRUE\n");
strcat(string, temp);
}
if ( Mptr->OVHD_LTG ) {
sprintf(temp, "LIGHTNING OVERHEAD : TRUE\n");
strcat(string, temp);
}
if ( Mptr->DSNT_LTG ) {
sprintf(temp, "DISTANT LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->LightningVCTS ) {
sprintf(temp, "L'NING W/I 5-10(ALP): TRUE\n");
strcat(string, temp);
}
if ( Mptr->LightningTS ) {
sprintf(temp, "L'NING W/I 5 (ALP) : TRUE\n");
strcat(string, temp);
}
if ( Mptr->VcyStn_LTG ) {
sprintf(temp, "VCY STN LIGHTNING : TRUE\n");
strcat(string, temp);
}
if ( Mptr->LTG_DIR[0] != '\0' ) {
sprintf(temp, "DIREC. OF LIGHTNING : %s\n", Mptr->LTG_DIR);
strcat(string, temp);
}
i = 0;
while( i < 3 && Mptr->ReWx[ i ].Recent_weather[0] != '\0' )
{
sprintf(temp, "RECENT WEATHER : %s",
Mptr->ReWx[i].Recent_weather);
strcat(string, temp);
if ( Mptr->ReWx[i].Bhh != MAXINT ) {
sprintf(temp, " BEG_hh = %d",Mptr->ReWx[i].Bhh);
strcat(string, temp);
}
if ( Mptr->ReWx[i].Bmm != MAXINT ) {
sprintf(temp, " BEG_mm = %d",Mptr->ReWx[i].Bmm);
strcat(string, temp);
}
if ( Mptr->ReWx[i].Ehh != MAXINT ) {
sprintf(temp, " END_hh = %d",Mptr->ReWx[i].Ehh);
strcat(string, temp);
}
if ( Mptr->ReWx[i].Emm != MAXINT ) {
sprintf(temp, " END_mm = %d",Mptr->ReWx[i].Emm);
strcat(string, temp);
}
strcat(string, "\n");
i++;
}
if ( Mptr->minCeiling != MAXINT ) {
sprintf(temp, "MIN VRBL_CIG (FT) : %d\n",Mptr->minCeiling);
strcat(string, temp);
}
if ( Mptr->maxCeiling != MAXINT ) {
sprintf(temp, "MAX VRBL_CIG (FT)) : %d\n",Mptr->maxCeiling);
strcat(string, temp);
}
if ( Mptr->CIG_2ndSite_Meters != MAXINT ) {
sprintf(temp, "CIG2ndSite (FT) : %d\n",Mptr->CIG_2ndSite_Meters);
strcat(string, temp);
}
if ( Mptr->CIG_2ndSite_LOC[0] != '\0' ) {
sprintf(temp, "CIG @ 2nd Site LOC. : %s\n",Mptr->CIG_2ndSite_LOC);
strcat(string, temp);
}
if ( Mptr->PRESFR ) {
sprintf(temp, "PRESFR : TRUE\n");
strcat(string, temp);
}
if ( Mptr->PRESRR ) {
sprintf(temp, "PRESRR : TRUE\n");
strcat(string, temp);
}
if ( Mptr->SLPNO ) {
sprintf(temp, "SLPNO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->SLP != (float) MAXINT ) {
sprintf(temp, "SLP (hPa) : %.1f\n", Mptr->SLP);
strcat(string, temp);
}
if ( Mptr->SectorVsby != (float) MAXINT ) {
sprintf(temp, "SECTOR VSBY (MILES) : %.2f\n", Mptr->SectorVsby );
strcat(string, temp);
}
if ( Mptr->SectorVsby_Dir[ 0 ] != '\0' ) {
sprintf(temp, "SECTOR VSBY OCTANT : %s\n", Mptr->SectorVsby_Dir );
strcat(string, temp);
}
if ( Mptr->TS_LOC[ 0 ] != '\0' ) {
sprintf(temp, "THUNDERSTORM LOCAT. : %s\n", Mptr->TS_LOC );
strcat(string, temp);
}
if ( Mptr->TS_MOVMNT[ 0 ] != '\0' ) {
sprintf(temp, "THUNDERSTORM MOVMNT.: %s\n", Mptr->TS_MOVMNT);
strcat(string, temp);
}
if ( Mptr->GR ) {
sprintf(temp, "GR (HAILSTONES) : TRUE\n");
strcat(string, temp);
}
if ( Mptr->GR_Size != (float) MAXINT ) {
sprintf(temp, "HLSTO SIZE (INCHES) : %.3f\n",Mptr->GR_Size);
strcat(string, temp);
}
if ( Mptr->VIRGA ) {
sprintf(temp, "VIRGA : TRUE\n");
strcat(string, temp);
}
if ( Mptr->VIRGA_DIR[0] != '\0' ) {
sprintf(temp, "DIR OF VIRGA FRM STN: %s\n", Mptr->VIRGA_DIR);
strcat(string, temp);
}
for( i = 0; i < 6; i++ ) {
if( Mptr->SfcObscuration[i][0] != '\0' ) {
sprintf(temp, "SfcObscuration : %s\n",
&(Mptr->SfcObscuration[i][0]) );
strcat(string, temp);
}
}
if ( Mptr->Num8thsSkyObscured != MAXINT ) {
sprintf(temp, "8ths of SkyObscured : %d\n",Mptr->Num8thsSkyObscured);
strcat(string, temp);
}
if ( Mptr->CIGNO ) {
sprintf(temp, "CIGNO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->Ceiling != MAXINT ) {
sprintf(temp, "Ceiling (ft) : %d\n",Mptr->Ceiling);
strcat(string, temp);
}
if ( Mptr->Estimated_Ceiling != MAXINT ) {
sprintf(temp, "Estimated CIG (ft) : %d\n",Mptr->Estimated_Ceiling);
strcat(string, temp);
}
if ( Mptr->VrbSkyBelow[0] != '\0' ) {
sprintf(temp, "VRB SKY COND BELOW : %s\n",Mptr->VrbSkyBelow);
strcat(string, temp);
}
if ( Mptr->VrbSkyAbove[0] != '\0' ) {
sprintf(temp, "VRB SKY COND ABOVE : %s\n",Mptr->VrbSkyAbove);
strcat(string, temp);
}
if ( Mptr->VrbSkyLayerHgt != MAXINT ) {
sprintf(temp, "VRBSKY COND HGT (FT): %d\n",Mptr->VrbSkyLayerHgt);
strcat(string, temp);
}
if ( Mptr->ObscurAloftHgt != MAXINT ) {
sprintf(temp, "Hgt Obscur Aloft(ft): %d\n",Mptr->ObscurAloftHgt);
strcat(string, temp);
}
if ( Mptr->ObscurAloft[0] != '\0' ) {
sprintf(temp, "Obscur Phenom Aloft : %s\n",Mptr->ObscurAloft);
strcat(string, temp);
}
if ( Mptr->ObscurAloftSkyCond[0] != '\0' ) {
sprintf(temp, "Obscur ALOFT SKYCOND: %s\n",Mptr->ObscurAloftSkyCond);
strcat(string, temp);
}
if ( Mptr->NOSPECI ) {
sprintf(temp, "NOSPECI : TRUE\n");
strcat(string, temp);
}
if ( Mptr->LAST ) {
sprintf(temp, "LAST : TRUE\n");
strcat(string, temp);
}
if ( Mptr->synoptic_cloud_type[ 0 ] != '\0' ) {
sprintf(temp, "SYNOPTIC CLOUD GROUP: %s\n",Mptr->synoptic_cloud_type);
strcat(string, temp);
}
if ( Mptr->CloudLow != '\0' ) {
sprintf(temp, "LOW CLOUD CODE : %c\n",Mptr->CloudLow);
strcat(string, temp);
}
if ( Mptr->CloudMedium != '\0' ) {
sprintf(temp, "MEDIUM CLOUD CODE : %c\n",Mptr->CloudMedium);
strcat(string, temp);
}
if ( Mptr->CloudHigh != '\0' ) {
sprintf(temp, "HIGH CLOUD CODE : %c\n",Mptr->CloudHigh);
strcat(string, temp);
}
if ( Mptr->SNINCR != MAXINT ) {
sprintf(temp, "SNINCR (INCHES) : %d\n",Mptr->SNINCR);
strcat(string, temp);
}
if ( Mptr->SNINCR_TotalDepth != MAXINT ) {
sprintf(temp, "SNINCR(TOT. INCHES) : %d\n",Mptr->SNINCR_TotalDepth);
strcat(string, temp);
}
if ( Mptr->snow_depth_group[ 0 ] != '\0' ) {
sprintf(temp, "SNOW DEPTH GROUP : %s\n",Mptr->snow_depth_group);
strcat(string, temp);
}
if ( Mptr->snow_depth != MAXINT ) {
sprintf(temp, "SNOW DEPTH (INCHES) : %d\n",Mptr->snow_depth);
strcat(string, temp);
}
if ( Mptr->WaterEquivSnow != (float) MAXINT ) {
sprintf(temp, "H2O EquivSno(inches): %.2f\n",Mptr->WaterEquivSnow);
strcat(string, temp);
}
if ( Mptr->SunshineDur != MAXINT ) {
sprintf(temp, "SUNSHINE (MINUTES) : %d\n",Mptr->SunshineDur);
strcat(string, temp);
}
if ( Mptr->SunSensorOut ) {
sprintf(temp, "SUN SENSOR OUT : TRUE\n");
strcat(string, temp);
}
if ( Mptr->hourlyPrecip != (float) MAXINT ) {
sprintf(temp, "HRLY PRECIP (INCHES): %.2f\n",Mptr->hourlyPrecip);
strcat(string, temp);
}
if( Mptr->precip_amt != (float) MAXINT) {
sprintf(temp, "3/6HR PRCIP (INCHES): %.2f\n",
Mptr->precip_amt);
strcat(string, temp);
}
if( Mptr->Indeterminant3_6HrPrecip ) {
sprintf(temp, "INDTRMN 3/6HR PRECIP: TRUE\n");
strcat(string, temp);
}
if( Mptr->precip_24_amt != (float) MAXINT) {
sprintf(temp, "24HR PRECIP (INCHES): %.2f\n",
Mptr->precip_24_amt);
strcat(string, temp);
}
if ( Mptr->Indeterminant_24HrPrecip ) {
sprintf(temp, "INDTRMN 24 HR PRECIP: TRUE\n");
strcat(string, temp);
}
if ( Mptr->Temp_2_tenths != (float) MAXINT ) {
sprintf(temp, "TMP2TENTHS (CELSIUS): %.1f\n",Mptr->Temp_2_tenths);
strcat(string, temp);
}
if ( Mptr->DP_Temp_2_tenths != (float) MAXINT ) {
sprintf(temp, "DPT2TENTHS (CELSIUS): %.1f\n",Mptr->DP_Temp_2_tenths);
strcat(string, temp);
}
if ( Mptr->maxtemp != (float) MAXINT) {
sprintf(temp, "MAX TEMP (CELSIUS) : %.1f\n",
Mptr->maxtemp);
strcat(string, temp);
}
if ( Mptr->mintemp != (float) MAXINT) {
sprintf(temp, "MIN TEMP (CELSIUS) : %.1f\n",
Mptr->mintemp);
strcat(string, temp);
}
if ( Mptr->max24temp != (float) MAXINT) {
sprintf(temp, "24HrMAXTMP (CELSIUS): %.1f\n",
Mptr->max24temp);
strcat(string, temp);
}
if ( Mptr->min24temp != (float) MAXINT) {
sprintf(temp, "24HrMINTMP (CELSIUS): %.1f\n",
Mptr->min24temp);
strcat(string, temp);
}
if ( Mptr->char_prestndcy != MAXINT) {
sprintf(temp, "CHAR PRESS TENDENCY : %d\n",
Mptr->char_prestndcy );
strcat(string, temp);
}
if ( Mptr->prestndcy != (float) MAXINT) {
sprintf(temp, "PRES. TENDENCY (hPa): %.1f\n",
Mptr->prestndcy );
strcat(string, temp);
}
if ( Mptr->PWINO ) {
sprintf(temp, "PWINO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->PNO ) {
sprintf(temp, "PNO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CHINO ) {
sprintf(temp, "CHINO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->CHINO_LOC[0] != '\0' ) {
sprintf(temp, "CHINO_LOC : %s\n",Mptr->CHINO_LOC);
strcat(string, temp);
}
if ( Mptr->VISNO ) {
sprintf(temp, "VISNO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->VISNO_LOC[0] != '\0' ) {
sprintf(temp, "VISNO_LOC : %s\n",Mptr->VISNO_LOC);
strcat(string, temp);
}
if ( Mptr->FZRANO ) {
sprintf(temp, "FZRANO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->TSNO ) {
sprintf(temp, "TSNO : TRUE\n");
strcat(string, temp);
}
if ( Mptr->DollarSign) {
sprintf(temp, "DOLLAR $IGN INDCATR : TRUE\n");
strcat(string, temp);
}
if ( Mptr->horiz_vsby[ 0 ] != '\0' ) {
sprintf(temp, "HORIZ VISIBILITY : %s\n",Mptr->horiz_vsby);
strcat(string, temp);
}
if ( Mptr->dir_min_horiz_vsby[ 0 ] != '\0' ) {
sprintf(temp, "DIR MIN HORIZ VSBY : %s\n",Mptr->dir_min_horiz_vsby);
strcat(string, temp);
}
if ( Mptr->CAVOK ) {
sprintf(temp, "CAVOK : TRUE\n");
strcat(string, temp);
}
if( Mptr->VertVsby != MAXINT ) {
sprintf(temp, "Vert. Vsby (meters) : %d\n",
Mptr->VertVsby );
strcat(string, temp);
}
/*
if( Mptr->charVertVsby[0] != '\0' )
sprintf(temp, "Vert. Vsby (CHAR) : %s\n",
Mptr->charVertVsby );
*/
if ( Mptr->QFE != MAXINT ) {
sprintf(temp, "QFE : %d\n", Mptr->QFE);
strcat(string, temp);
}
if ( Mptr->VOLCASH ) {
sprintf(temp, "VOLCANIC ASH : TRUE\n");
strcat(string, temp);
}
if ( Mptr->min_vrbl_wind_dir != MAXINT ) {
sprintf(temp, "MIN VRBL WIND DIR : %d\n",Mptr->min_vrbl_wind_dir);
strcat(string, temp);
}
if ( Mptr->max_vrbl_wind_dir != MAXINT ) {
sprintf(temp, "MAX VRBL WIND DIR : %d\n",Mptr->max_vrbl_wind_dir);
strcat(string, temp);
}
strcat(string, "\n\n\n");
}
void prtDMETR (Decoded_METAR *Mptr)
{
char string[5000];
sprint_metar(string, Mptr);
printf(string);
}

Wyświetl plik

@ -0,0 +1,230 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma comment (compiler)
#pragma comment (date)
#pragma comment (timestamp)
#pragma pagesize(80)
#include "local.h" /* standard header file */
#pragma page(1)
#pragma subtitle(" ")
#pragma subtitle("stspack2 - Local string test functions ")
/********************************************************************/
/* */
/* Title: stspack2 */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 05 Oct 1992 */
/* Programmer: ALLAN DARLING */
/* Language: C/2 */
/* */
/* Abstract: The stspack2 package contains functions to */
/* perform the isalnum through isxdigit functions */
/* on strings. The functions come in four forms: */
/* those that test NULL delimited strings and are */
/* named in the form sxxxxxxx, those that test at */
/* most n characters and are named in the form */
/* nxxxxxxx, those that search forward in a string */
/* and are named in the form nxtyyyyy, and those */
/* that search backward in a string and are named */
/* in the form lstyyyyy. */
/* */
/* The xxxxxxx is the name of the test applied to */
/* each character in the string, such as isalpha, */
/* thus a function to test a NULL delimited string */
/* an return a nonzero value if all characters in */
/* the string are digits is named sisdigit. */
/* */
/* The yyyyy is the name of the test applied to */
/* characters in a string, minus the 'is' prefix. */
/* Thus a function to find the next digit in a NULL */
/* delimited string and return a pointer to it is */
/* named nxtdigit. */
/* */
/* The only exception to the naming rule is for the */
/* functions that test for hexadecimal digits. */
/* These are named sisxdigi, nisxdigi, nxtxdigi, */
/* and lstxdigi because of the eight character */
/* function name limitation. */
/* */
/* The nxxxxxxx class of functions will test up to */
/* n characters or the first NULL character */
/* encountered, whichever comes first. For all */
/* classes of functions, the string sentinal is */
/* not included in the test. */
/* */
/* External Functions Called: */
/* isalnum, isalpha, iscntrl, isdigit, isgraph, */
/* islower, isprint, ispunct, isspace, isupper, */
/* isxdigit. */
/* */
/* Input: For sxxxxxxx class functions, a pointer to a */
/* NULL delimited character string. */
/* */
/* For nxtyyyyy class functions, a pointer to a */
/* NULL delimited character string. */
/* */
/* for nxxxxxxx class functions, a pointer to a */
/* character array, and a positive, nonzero integer.*/
/* */
/* for lstyyyyy class functions, a pointer to a */
/* character array, and a positive, nonzero integer.*/
/* */
/* Output: A nonzero value if the test is true for all */
/* characters in the string, a zero value otherwise.*/
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#pragma page(1)
int nisalnum(char *s, int n) {
for (; *s && n; s++, n--)
if (!isalnum(*s))
return (0);
return (1);
} /* end nisalnum */
int nisalpha(char *s, int n) {
for (; *s && n; s++, n--)
if (!isalpha(*s))
return (0);
return (1);
} /* end nisalpha */
int niscntrl(char *s, int n) {
for (; *s && n; s++, n--)
if (!iscntrl(*s))
return (0);
return (1);
} /* end niscntrl */
int nisdigit(char *s, int n) {
for (; *s && n; s++, n--)
if (!isdigit(*s))
return (0);
return (1);
} /* end nisdigit */
int nisgraph(char *s, int n) {
for (; *s && n; s++, n--)
if (!isgraph(*s))
return (0);
return (1);
} /* end nisgraph */
int nislower(char *s, int n) {
for (; *s && n; s++, n--)
if (!islower(*s))
return (0);
return (1);
} /* end nislower */
int nisprint(char *s, int n) {
for (; *s && n; s++, n--)
if (!isprint(*s))
return (0);
return (1);
} /* end nisprint */
int nispunct(char *s, int n) {
for (; *s && n; s++, n--)
if (!ispunct(*s))
return (0);
return (1);
} /* end nispunct */
int nisspace(char *s, int n) {
for (; *s && n; s++, n--)
if (!isspace(*s))
return (0);
return (1);
} /* end nisspace */
int nisupper(char *s, int n) {
for (; *s && n; s++, n--)
if (!isupper(*s))
return (0);
return (1);
} /* end nisupper */
int nisxdigi(char *s, int n) {
for (; *s && n; s++, n--)
if (!isxdigit(*s))
return (0);
return (1);
} /* end nisxdigi */
#pragma page(1)

Wyświetl plik

@ -0,0 +1,230 @@
/*
METAR Decoder Software Package Library: Parses Aviation Routine Weather Reports
Copyright (C) 2003 Eric McCarthy
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma comment (compiler)
#pragma comment (date)
#pragma comment (timestamp)
#pragma pagesize(80)
#include "local.h" /* standard header file */
#pragma page(1)
#pragma subtitle(" ")
#pragma subtitle("stspack3 - Local string test functions ")
/********************************************************************/
/* */
/* Title: stspack3 */
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
/* Date: 05 Oct 1992 */
/* Programmer: ALLAN DARLING */
/* Language: C/2 */
/* */
/* Abstract: The stspack3 package contains functions to */
/* perform the isalnum through isxdigit functions */
/* on strings. The functions come in four forms: */
/* those that test NULL delimited strings and are */
/* named in the form sxxxxxxx, those that test at */
/* most n characters and are named in the form */
/* nxxxxxxx, those that search forward in a string */
/* and are named in the form nxtyyyyy, and those */
/* that search backward in a string and are named */
/* in the form lstyyyyy. */
/* */
/* The xxxxxxx is the name of the test applied to */
/* each character in the string, such as isalpha, */
/* thus a function to test a NULL delimited string */
/* an return a nonzero value if all characters in */
/* the string are digits is named sisdigit. */
/* */
/* The yyyyy is the name of the test applied to */
/* characters in a string, minus the 'is' prefix. */
/* Thus a function to find the next digit in a NULL */
/* delimited string and return a pointer to it is */
/* named nxtdigit. */
/* */
/* The only exception to the naming rule is for the */
/* functions that test for hexadecimal digits. */
/* These are named sisxdigi, nisxdigi, nxtxdigi, */
/* and lstxdigi because of the eight character */
/* function name limitation. */
/* */
/* The nxxxxxxx class of functions will test up to */
/* n characters or the first NULL character */
/* encountered, whichever comes first. For all */
/* classes of functions, the string sentinal is */
/* not included in the test. */
/* */
/* External Functions Called: */
/* isalnum, isalpha, iscntrl, isdigit, isgraph, */
/* islower, isprint, ispunct, isspace, isupper, */
/* isxdigit. */
/* */
/* Input: For sxxxxxxx class functions, a pointer to a */
/* NULL delimited character string. */
/* */
/* For nxtyyyyy class functions, a pointer to a */
/* NULL delimited character string. */
/* */
/* for nxxxxxxx class functions, a pointer to a */
/* character array, and a positive, nonzero integer.*/
/* */
/* for lstyyyyy class functions, a pointer to a */
/* character array, and a positive, nonzero integer.*/
/* */
/* Output: A nonzero value if the test is true for all */
/* characters in the string, a zero value otherwise.*/
/* */
/* Modification History: */
/* None. */
/* */
/********************************************************************/
#pragma page(1)
char *nxtalnum(char *s) {
for (; !isalnum(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtalnum */
char *nxtalpha(char *s) {
for (; !isalpha(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtalpha */
char *nxtcntrl(char *s) {
for (; !iscntrl(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtcntrl */
char *nxtdigit(char *s) {
for (; !isdigit(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtdigit */
char *nxtgraph(char *s) {
for (; !isgraph(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtgraph */
char *nxtlower(char *s) {
for (; !islower(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtlower */
char *nxtprint(char *s) {
for (; !isprint(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtprint */
char *nxtpunct(char *s) {
for (; !ispunct(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtpunct */
char *nxtspace(char *s) {
for (; !isspace(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtspace */
char *nxtupper(char *s) {
for (; !isupper(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtupper */
char *nxtxdigi(char *s) {
for (; !isxdigit(*s) && *s; s++) ;
if (*s)
return (s);
else
return (NULL);
} /* end nxtxdigi */
#pragma page(1)