publish the metar date/time to metarproperties
This commit is contained in:
parent
0473607731
commit
16869d0362
2 changed files with 12 additions and 0 deletions
|
@ -134,6 +134,9 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
|
|||
_hail(0.0),
|
||||
_snow(0.0),
|
||||
_snow_cover(false),
|
||||
_day(0),
|
||||
_hour(0),
|
||||
_minute(0),
|
||||
_magneticVariation(new MagneticVariation())
|
||||
{
|
||||
// Hack to avoid static initialization order problems on OSX
|
||||
|
@ -174,6 +177,9 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
|
|||
_tiedProperties.Tie("hail-norm", &_hail );
|
||||
_tiedProperties.Tie("snow-norm", &_snow);
|
||||
_tiedProperties.Tie("snow-cover", &_snow_cover );
|
||||
_tiedProperties.Tie("day", &_day );
|
||||
_tiedProperties.Tie("hour", &_hour );
|
||||
_tiedProperties.Tie("minute", &_minute );
|
||||
_tiedProperties.Tie("decoded", this, &MetarProperties::get_decoded );
|
||||
}
|
||||
|
||||
|
@ -404,6 +410,9 @@ void MetarProperties::setMetar( SGSharedPtr<FGMetar> m )
|
|||
_hail = m->getHail();
|
||||
_snow = m->getSnow();
|
||||
_snow_cover = m->getSnowCover();
|
||||
_day = m->getDay();
|
||||
_hour = m->getHour();
|
||||
_minute = m->getMinute();
|
||||
_metarValidNode->setBoolValue(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,9 @@ private:
|
|||
double _snow;
|
||||
bool _snow_cover;
|
||||
std::string _decoded;
|
||||
int _day;
|
||||
int _hour;
|
||||
int _minute;
|
||||
protected:
|
||||
simgear::TiedPropertyList _tiedProperties;
|
||||
MagneticVariation * _magneticVariation;
|
||||
|
|
Loading…
Reference in a new issue