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