]> git.mxchange.org Git - simgear.git/blob - simgear/metar/MetarReport.h
Fixes for MSVC++.
[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         // Directions in degrees
42         // Speed in knots
43         // Altitude in meters
44         // Temperature in centigrade
45
46         int WindDirection();
47         int WindSpeed();
48         int WindGustSpeed();
49
50         // Add cloud more cloud info...
51         // Cloud code characters...
52         char CloudLow();
53         char CloudMedium();
54         char CloudHigh();
55
56         bool Virga();
57         int VirgaDirection();
58
59         int TornadicDirection();        
60         int TornadicMovementDirection();
61
62         int ThunderStormDirection();
63         int ThunderStormMovementDirection();
64         
65         bool VolcanicAsh();
66         bool Hail();
67
68         int LightningDirection();
69         bool OccationalLightning();
70         bool FrequentLightning();
71         bool ContinuousLightning();
72         bool Lightning()
73         { 
74                 return OccationalLightning() || FrequentLightning() || ContinuousLightning();
75         }
76
77         bool CloudToGroundLightning();
78         bool InterCloudLightning();
79         bool CloudToCloudLightning();
80         bool CloudToAirLightning();
81
82         bool DistantLightning();
83         bool AirportLightning();
84         bool OverheadLightning();
85         bool VicinityLightning();
86
87         int Temperature();
88         int DewpointTemperature();
89
90         int VerticalVisibility();
91         int Ceiling();
92         int EstimatedCeiling();
93         int VariableSkyLayerHeight();
94
95         int SnowDepthInches();
96  
97         void dump();
98
99 private:
100         CMetarReport(
101                 const CMetarReport &rNewObj );
102                         // Copy constructor.  Not implemented.
103
104         CMetarReport &operator =(
105                 const CMetarReport &rObj );
106                         // Assignment operator.  Not implemented.
107 };
108
109 std::ostream& operator << ( std::ostream&, CMetarReport& );
110
111 #endif