]> git.mxchange.org Git - simgear.git/blob - simgear/metar/MetarReport.h
Tweaks to follow flightgear STL standard coding procedure.
[simgear.git] / simgear / metar / MetarReport.h
1 // Class encapulating the metar report information
2 //
3 // Individual METAR reports are found in this directory:
4 //   ftp://weather.noaa.gov/data/observations/metar/stations
5 //
6
7 #ifndef _MetarReport_
8 #define _MetarReport_
9
10 #include <simgear/compiler.h>
11
12 #include STL_IOSTREAM
13 #include STL_STRING
14 #include <vector>
15
16 #include <simgear/math/point3d.hxx>
17 #include <simgear/math/polar3d.hxx>
18
19 FG_USING_STD(string);
20
21 class CMetarReport
22 {
23         // Typedefs, enumerations
24
25         // Attributes
26 private:
27         void *m_DecodedReport;
28                 // A void pointer which is cast to the correct type in the cpp file.
29                 // I don't want the ugly metar structure and header files dragged into
30                 // every report user program file.
31                 // Probably should be a smart pointer if copy constructor and assignment
32                 // is allowed.
33
34         // Operations
35
36 public:
37         CMetarReport( 
38                 char *s );
39                         // Constructor
40
41         ~CMetarReport();
42                         // Destructor
43
44         char *StationID();
45
46         int Day();    // The day of month on which the report was issued.
47         int Hour();   // The hour of the day the report was issued.
48         int Minutes();  //Minutes past the hour of the report issue time.
49
50         // Directions in degrees
51         // Speed in knots
52         // Altitude in meters
53         // Temperature in centigrade
54
55         int WindDirection();
56         int WindSpeed();
57         int WindGustSpeed();
58
59         // Add cloud more cloud info...
60         // Cloud code characters...
61         char CloudLow();
62         char CloudMedium();
63         char CloudHigh();
64
65         bool Virga();
66         int VirgaDirection();
67
68         int TornadicDirection();        
69         int TornadicMovementDirection();
70
71         int ThunderStormDirection();
72         int ThunderStormMovementDirection();
73         
74         bool VolcanicAsh();
75         bool Hail();
76
77         int LightningDirection();
78         bool OccationalLightning();
79         bool FrequentLightning();
80         bool ContinuousLightning();
81         bool Lightning()
82         { 
83                 return OccationalLightning() || FrequentLightning() || ContinuousLightning();
84         }
85
86         bool CloudToGroundLightning();
87         bool InterCloudLightning();
88         bool CloudToCloudLightning();
89         bool CloudToAirLightning();
90
91         bool DistantLightning();
92         bool AirportLightning();
93         bool OverheadLightning();
94         bool VicinityLightning();
95
96         int Temperature();
97         int DewpointTemperature();
98
99         int VerticalVisibility();
100         int Ceiling();
101         int EstimatedCeiling();
102         int VariableSkyLayerHeight();
103
104         int SnowDepthInches();
105
106         double AirPressure();  //Return the air pressure in InchesHg.
107         double PrevailVisibility(); // Prevailing Visibility in meters.
108         void dump();
109
110 private:
111         CMetarReport(
112                 const CMetarReport &rNewObj );
113                         // Copy constructor.  Not implemented.
114
115         CMetarReport &operator =(
116                 const CMetarReport &rObj );
117                         // Assignment operator.  Not implemented.
118 };
119
120 std::ostream& operator << ( std::ostream&, CMetarReport& );
121
122 #endif