1 // Class encapulating the metar station information
3 // METAR station information is kept in this file:
4 // http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.gz
5 // http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.txt
6 // This class looks for the file FG_ROOT/Weather/MetarStations instread of nsd_cccc.
14 #include <simgear/math/point3d.hxx>
15 #include <simgear/math/polar3d.hxx>
16 //using namespace std;
23 unsigned long m_number;
26 std::string m_country;
28 Point3D m_locationPolar;
29 Point3D m_upperLocationPolar;
30 Point3D m_locationCart;
31 Point3D m_upperLocationCart;
36 static int initialized;
37 static std::string tempName;
41 double decodeDMS( char *b );
42 static int sameName( CMetarStation *m );
54 std::string &ID() { return m_ID; }
55 unsigned long number() { return m_number; }
56 std::string &name() { return m_name; }
57 std::string &state() { return m_state; }
58 std::string &country() { return m_country; }
59 int region() { return m_region; }
60 Point3D &locationPolar() { return m_locationPolar; }
61 Point3D &upperLocationPolar() { return m_upperLocationPolar; }
62 Point3D &locationCart() { return m_locationCart; }
63 Point3D &upperLocationCart() { return m_upperLocationCart; }
64 char pFlag() { return m_pFlag; }
67 friend std::ostream& operator << ( std::ostream&, const CMetarStation& );
70 static CMetarStation *find( std::string stationID );
71 static CMetarStation *find( Point3D locationCart );
72 static void for_each( void f( CMetarStation *s ) );
76 const CMetarStation &rNewObj );
77 // Copy constructor. Not implemented.
79 CMetarStation &operator =(
80 const CMetarStation &rObj );
81 // Assignment operator. Not implemented.
83 static int initialize();