Files
simgear/simgear/metar
david 78411d29a7 Patch from Erik Hofman:
This patch adds some more functionality to the header files and removes
*all* dependencies on SG_HAVE_NATIVE_SGI_COMPILERS in the SimGear code!

[dpm: I had to add some additional SG_USING_STD declarations to make
it compile]
2002-12-31 14:47:34 +00:00
..
2002-03-02 23:37:04 +00:00
2002-03-02 23:37:04 +00:00
2002-06-28 15:53:58 +00:00
2002-03-02 23:37:04 +00:00
2002-03-02 23:37:04 +00:00
2002-03-02 23:37:04 +00:00
2000-02-09 19:27:02 +00:00
2000-02-09 19:27:02 +00:00
2002-12-31 14:47:34 +00:00
2001-03-23 21:59:44 +00:00
2002-12-31 14:47:34 +00:00
2001-05-23 19:25:27 +00:00
2002-03-02 23:37:04 +00:00
2000-02-09 19:27:02 +00:00
2002-03-02 23:37:04 +00:00
2002-03-02 23:37:04 +00:00

There are 2 classes: CMetarStation (MetarStation.h) and CMetarReport
(MetarReport.h).  These classes provide mechanisms to get information
about meteorological data reporting stations and about the reports 
themselves.  These stations and reports are known as METAR.  See
http://tgsv5.nws.noaa.gov/oso/oso1/oso12/metar.htm for information
from the USA perspective.  Quoting from that site:

 On 1 July 1996, the international standard code for hourly and special 
 surface weather observations, METAR/SPECI, took effect. 
 The METAR acronym roughly translates from the French as Aviation 
 Routine Weather Report . A special report, SPECI, is merely a METAR 
 formatted report which is issued on a non-routine basis as dictated by
 changing meteorological conditions. The SPECI acronym roughly translates as

 Aviation Selected Special Weather Report . Meanwhile, the international 
 standard code format for terminal forecasts issued for airports, TAF, 
 also took effect. The acronym translates to Aerodrome Forecast.

This implementation ignores the SPECI and TAF acronyms, calling the
entire system METAR.

The class CMetarStation is implemented by MetarStation.h and
MetarStation.cpp.  It decodes a text file containing information about
individual METAR reporting stations and builds a static database of that
information during static construction of the class.  There are static
member methods to find individual stations, and member functions to
extract individual station attributes.  The information about METAR
stations probably has some overlap with FGFS airport information.  That
needs to be investigated.  The METAR station information is kept in this
file:
  http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.gz
  http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.txt
This class looks for the file FG_ROOT/Weather/MetarStations instead of
nsd_cccc.
The current implementation does not look for updates to this file on the
internet.

The class CMetarReport is implemented by MetarReport.h and MetarReport.cpp.
It encapsulates the decoding software written by Carl McCalla at -
     NOAA/National Weather Service
     1325 East-West Highway
     SSMC2, W/OSO242, Station 5114
     Silver Spring, Maryland 20910
     Work:                     (301) 713-0882, Ext 115
     FAX:                      (301) 608-0911 
     E-Mail Address:           cmccalla@smtpgate.ssmc.noaa.gov
http://www.nws.noaa.gov/software/
This software generally sucks and the CMetarReport class attempts to clean
up some of that suckiness.  A CMetarReport object is created with an ASCII
string as a construction parameter.  The string contains a METAR report.
There
are member methods to extract selected information from a report by calling
the McCalla software.  Additional information can be selected by adding new
member methods as needed.  Certainly the methods currently implemented are
not sufficient.  METAR reports are available via the internet.  In the USA,
NOAA provides individual METAR reports in this directory:
   ftp://weather.noaa.gov/data/observations/metar/stations
Other sources are available as well.  The current implementation does not
look for reports on the internet.

There is a test program in the MetarTest subdirectory.  It requires that a
#define be changed in the MetarStation.cpp file.  Add #define TESTPROG to
the code or -D TESTPROG to the compilation.  This is necessary because the
FGFS options class is coupled tightly to code that shouldn't be pulled into
the test program.  The test program will decode many METAR reports and
display
them to the screen, then it will plot all the METAR reporting stations on a
tumbling globe.