#include <boost/tuple/tuple.hpp>
-#include <plib/sg.h>
-
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/interpolater.hxx>
wind_from_down_fps = 0;
thermal_lift_fps = 0;
ridge_lift_fps= 0;
+ local_weather_lift_fps=0;
altitude_half_to_sun_m = 1000;
altitude_tropo_top_m = 10000;
#ifdef USING_TABLES
wind_from_down_fps = env.wind_from_down_fps;
thermal_lift_fps = env.thermal_lift_fps;
ridge_lift_fps= env.ridge_lift_fps;
+ local_weather_lift_fps = env.local_weather_lift_fps;
turbulence_magnitude_norm = env.turbulence_magnitude_norm;
turbulence_rate_hz = env.turbulence_rate_hz;
}
maybe_copy_value(this, node, "turbulence/rate-hz",
&FGEnvironment::set_turbulence_rate_hz);
+
// calculate derived properties here to avoid duplicate expensive computations
_recalc_ne();
_recalc_alt_pt();
return ridge_lift_fps;
}
+double
+FGEnvironment::get_local_weather_lift_fps () const
+{
+ return local_weather_lift_fps;
+}
+
double
FGEnvironment::get_turbulence_magnitude_norm () const
{
ridge_lift_fps = ri;
if( live_update ) {
_recalc_updraft();
+ }
}
+
+void
+FGEnvironment::set_local_weather_lift_fps (double lwl)
+{
+ local_weather_lift_fps = lwl;
+ if( live_update ) {
+ _recalc_updraft();
+ }
}
void
void
FGEnvironment::_recalc_updraft ()
{
- wind_from_down_fps = thermal_lift_fps + ridge_lift_fps ;
+ wind_from_down_fps = thermal_lift_fps + ridge_lift_fps + local_weather_lift_fps ;
}
// Intended to help with the interpretation of METAR data,
<< " and " << temperature_sea_level_degc
<< " :: " << this
<< " # " << count);
- ///////////////////////////////////raise(SIGUSR1);
}
}
#endif