1
0
Fork 0

For metar, correctly update visibility and pressure/altimeter. Temp and

clouds need to be implimented (and adjusted for station elevation.)
This commit is contained in:
curt 2004-02-22 02:06:05 +00:00
parent 3dd9b14190
commit b464703a6f

View file

@ -28,6 +28,7 @@
#include <simgear/structure/exception.hxx>
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
#include "environment_mgr.hxx"
#include "environment_ctrl.hxx"
@ -346,13 +347,18 @@ FGMetarEnvironmentCtrl::init ()
fgGetDouble("/environment/metar/base-wind-speed-kt"),
fgGetDouble("/environment/metar/gust-wind-speed-kt") );
fgSetDouble("/environment/visibility-m",
fgDefaultWeatherValue( "visibility-m",
fgGetDouble("/environment/metar/min-visibility-m") );
// FIXME: this isn't the correct place in the property tree to set
// the weather and it doesn't account for weather station
// elevation.
fgSetDouble("/environment/temperature-degc",
fgGetDouble("/environment/metar/temperature-degc"));
fgSetDouble("/environment/dewpoint-degc",
fgGetDouble("/environment/metar/dewpoint-degc"));
fgSetDouble("/environment/pressure-inhg",
fgDefaultWeatherValue( "pressure-sea-level-inhg",
fgGetDouble("/environment/metar/pressure-inhg") );
env->init();
@ -373,16 +379,19 @@ FGMetarEnvironmentCtrl::reinit ()
fgGetDouble("/environment/metar/base-wind-speed-kt"),
fgGetDouble("/environment/metar/gust-wind-speed-kt") );
fgSetDouble("/environment/visibility-m",
fgDefaultWeatherValue( "visibility-m",
fgGetDouble("/environment/metar/min-visibility-m") );
fgSetDouble("/environment/pressure-inhg",
fgGetDouble("/environment/metar/pressure-inhg"));
// FIXME: The following seem to egt overriden?
// FIXME: this isn't the correct place in the property tree to set
// the weather and it doesn't account for weather station
// elevation.
fgSetDouble("/environment/temperature-degc",
fgGetDouble("/environment/metar/temperature-degc"));
fgSetDouble("/environment/dewpoint-degc",
fgGetDouble("/environment/metar/dewpoint-degc"));
fgDefaultWeatherValue( "pressure-sea-level-inhg",
fgGetDouble("/environment/metar/pressure-inhg") );
#endif
env->reinit();