Added Farenheit temperature conversion to the property tree.
This commit is contained in:
parent
70fe768e5c
commit
5c6020f2bc
3 changed files with 9 additions and 0 deletions
|
@ -235,6 +235,12 @@ FGEnvironment::get_temperature_degc () const
|
|||
return temperature_degc;
|
||||
}
|
||||
|
||||
double
|
||||
FGEnvironment::get_temperature_degf () const
|
||||
{
|
||||
return (temperature_degc * 9.0 / 5.0) + 32.0;
|
||||
}
|
||||
|
||||
double
|
||||
FGEnvironment::get_dewpoint_sea_level_degc () const
|
||||
{
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
|
||||
virtual double get_temperature_sea_level_degc () const;
|
||||
virtual double get_temperature_degc () const;
|
||||
virtual double get_temperature_degf () const;
|
||||
virtual double get_dewpoint_sea_level_degc () const;
|
||||
virtual double get_dewpoint_degc () const;
|
||||
virtual double get_pressure_sea_level_inhg () const;
|
||||
|
|
|
@ -87,6 +87,8 @@ FGEnvironmentMgr::bind ()
|
|||
fgSetArchivable("/environment/temperature-sea-level-degc");
|
||||
fgTie("/environment/temperature-degc", _environment,
|
||||
&FGEnvironment::get_temperature_degc); // FIXME: read-only for now
|
||||
fgTie("/environment/temperature-degf", _environment,
|
||||
&FGEnvironment::get_temperature_degf); // FIXME: read-only for now
|
||||
fgTie("/environment/dewpoint-sea-level-degc", _environment,
|
||||
&FGEnvironment::get_dewpoint_sea_level_degc,
|
||||
&FGEnvironment::set_dewpoint_sea_level_degc);
|
||||
|
|
Loading…
Reference in a new issue