1
0
Fork 0

Added Farenheit temperature conversion to the property tree.

This commit is contained in:
curt 2005-05-20 19:42:53 +00:00
parent 70fe768e5c
commit 5c6020f2bc
3 changed files with 9 additions and 0 deletions

View file

@ -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
{

View file

@ -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;

View file

@ -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);