1
0
Fork 0

Bind the CAVOK flag to metarproperties

This commit is contained in:
Torsten Dreyer 2014-02-25 09:42:00 +01:00
parent f1e0206f30
commit c152e7f118
2 changed files with 4 additions and 0 deletions

View file

@ -137,6 +137,7 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
_day(0),
_hour(0),
_minute(0),
_cavok(false),
_magneticVariation(new MagneticVariation())
{
// Hack to avoid static initialization order problems on OSX
@ -181,6 +182,7 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
_tiedProperties.Tie("hour", &_hour );
_tiedProperties.Tie("minute", &_minute );
_tiedProperties.Tie("decoded", this, &MetarProperties::get_decoded );
_tiedProperties.Tie("cavok", &_cavok );
}
MetarProperties::~MetarProperties()
@ -413,6 +415,7 @@ void MetarProperties::setMetar( SGSharedPtr<FGMetar> m )
_day = m->getDay();
_hour = m->getHour();
_minute = m->getMinute();
_cavok = m->getCAVOK();
_metarValidNode->setBoolValue(true);
}

View file

@ -95,6 +95,7 @@ private:
int _day;
int _hour;
int _minute;
bool _cavok;
protected:
simgear::TiedPropertyList _tiedProperties;
MagneticVariation * _magneticVariation;