/usr/include/metar.h is in libmdsp-dev 0.11-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | /*
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 );
|