src/Environment/metarproperties.*: put human-readable metar description into properties.
We set /environment/metar/description to human-readable description of metar, for use by fgdata's weather dialogue, using simgear FGMetar's new description() method.
This commit is contained in:
parent
68a72f22f2
commit
191f53ff5e
2 changed files with 4 additions and 0 deletions
|
@ -183,6 +183,7 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
|
|||
_tiedProperties.Tie("minute", &_minute );
|
||||
_tiedProperties.Tie("decoded", this, &MetarProperties::get_decoded );
|
||||
_tiedProperties.Tie("cavok", &_cavok );
|
||||
_tiedProperties.Tie("description", this, &MetarProperties::get_description );
|
||||
}
|
||||
|
||||
MetarProperties::~MetarProperties()
|
||||
|
@ -422,6 +423,7 @@ void MetarProperties::setMetar( SGSharedPtr<FGMetar> m )
|
|||
_minute = m->getMinute();
|
||||
_cavok = m->getCAVOK();
|
||||
_metarValidNode->setBoolValue(true);
|
||||
_description = m->getDescription(8);
|
||||
}
|
||||
|
||||
void MetarProperties::setStationId( const std::string & value )
|
||||
|
|
|
@ -53,6 +53,7 @@ private:
|
|||
const char * get_station_id() const { return _station_id.c_str(); }
|
||||
void set_station_id( const char * value );
|
||||
const char * get_decoded() const { return _decoded.c_str(); }
|
||||
const char * get_description() const { return _description.c_str(); }
|
||||
double get_magnetic_variation_deg() const;
|
||||
double get_magnetic_dip_deg() const;
|
||||
double get_wind_from_north_fps() const { return _wind_from_north_fps; }
|
||||
|
@ -97,6 +98,7 @@ private:
|
|||
int _hour;
|
||||
int _minute;
|
||||
bool _cavok;
|
||||
std::string _description;
|
||||
protected:
|
||||
simgear::TiedPropertyList _tiedProperties;
|
||||
MagneticVariation * _magneticVariation;
|
||||
|
|
Loading…
Add table
Reference in a new issue