#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
-
+#include <cmath>
/**
* Model the natural environment.
virtual double get_wind_from_north_fps () const;
virtual double get_wind_from_east_fps () const;
virtual double get_wind_from_down_fps () const;
+ virtual double get_thermal_lift_fps () const;
+ virtual double get_ridge_lift_fps () const;
virtual double get_turbulence_magnitude_norm () const;
virtual double get_turbulence_rate_hz () const;
virtual void set_wind_from_north_fps (double n);
virtual void set_wind_from_east_fps (double e);
virtual void set_wind_from_down_fps (double d);
+ virtual void set_thermal_lift_fps (double th);
+ virtual void set_ridge_lift_fps (double ri);
virtual void set_turbulence_magnitude_norm (double t);
virtual void set_turbulence_rate_hz (double t);
virtual void set_altitude_half_to_sun_m (double alt);
virtual void set_altitude_tropo_top_m (double alt);
-private:
+ virtual bool set_live_update(bool live_update);
- void _recalc_hdgspd ();
void _recalc_ne ();
+ void _recalc_alt_dewpoint ();
+ void _recalc_density ();
+ void _recalc_relative_humidity ();
+ void _recalc_alt_pt ();
+private:
+ void _init();
+ void _recalc_hdgspd ();
+ void _recalc_updraft ();
void _recalc_sl_temperature ();
- void _recalc_alt_temperature ();
void _recalc_sl_dewpoint ();
- void _recalc_alt_dewpoint ();
void _recalc_sl_pressure ();
- void _recalc_alt_pressure ();
- void _recalc_density ();
void _recalc_density_tropo_avg_kgm3 ();
- void _recalc_relative_humidity ();
double elevation_ft;
double visibility_m;
double wind_from_north_fps;
double wind_from_east_fps;
double wind_from_down_fps;
+ double thermal_lift_fps;
+ double ridge_lift_fps;
+
+ bool live_update;
};