Merge branch 'maint' into next
This commit is contained in:
commit
b8724644c6
4 changed files with 33 additions and 24 deletions
|
@ -118,33 +118,39 @@ _setup_tables ()
|
||||||
// Implementation of FGEnvironment.
|
// Implementation of FGEnvironment.
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
FGEnvironment::FGEnvironment()
|
void FGEnvironment::_init()
|
||||||
: elevation_ft(0),
|
|
||||||
visibility_m(32000),
|
|
||||||
temperature_sea_level_degc(15),
|
|
||||||
temperature_degc(15),
|
|
||||||
dewpoint_sea_level_degc(5), // guess
|
|
||||||
dewpoint_degc(5),
|
|
||||||
pressure_sea_level_inhg(29.92),
|
|
||||||
pressure_inhg(29.92),
|
|
||||||
turbulence_magnitude_norm(0),
|
|
||||||
turbulence_rate_hz(1),
|
|
||||||
wind_from_heading_deg(0),
|
|
||||||
wind_speed_kt(0),
|
|
||||||
wind_from_north_fps(0),
|
|
||||||
wind_from_east_fps(0),
|
|
||||||
wind_from_down_fps(0),
|
|
||||||
altitude_half_to_sun_m(1000),
|
|
||||||
altitude_tropo_top_m(10000)
|
|
||||||
{
|
{
|
||||||
_setup_tables();
|
elevation_ft = 0;
|
||||||
_recalc_density();
|
visibility_m = 32000;
|
||||||
_recalc_relative_humidity();
|
temperature_sea_level_degc = 15;
|
||||||
|
temperature_degc = 15;
|
||||||
|
dewpoint_sea_level_degc = 5; // guess
|
||||||
|
dewpoint_degc = 5;
|
||||||
|
pressure_sea_level_inhg = 29.92;
|
||||||
|
pressure_inhg = 29.92;
|
||||||
|
turbulence_magnitude_norm = 0;
|
||||||
|
turbulence_rate_hz = 1;
|
||||||
|
wind_from_heading_deg = 0;
|
||||||
|
wind_speed_kt = 0;
|
||||||
|
wind_from_north_fps = 0;
|
||||||
|
wind_from_east_fps = 0;
|
||||||
|
wind_from_down_fps = 0;
|
||||||
|
altitude_half_to_sun_m = 1000;
|
||||||
|
altitude_tropo_top_m = 10000;
|
||||||
|
_setup_tables();
|
||||||
|
_recalc_density();
|
||||||
|
_recalc_relative_humidity();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FGEnvironment::FGEnvironment()
|
||||||
|
{
|
||||||
|
_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
FGEnvironment::FGEnvironment (const FGEnvironment &env)
|
FGEnvironment::FGEnvironment (const FGEnvironment &env)
|
||||||
{
|
{
|
||||||
FGEnvironment();
|
_init();
|
||||||
copy(env);
|
copy(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
virtual void set_altitude_tropo_top_m (double alt);
|
virtual void set_altitude_tropo_top_m (double alt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void _init();
|
||||||
void _recalc_hdgspd ();
|
void _recalc_hdgspd ();
|
||||||
void _recalc_ne ();
|
void _recalc_ne ();
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ FGClouds::FGClouds(FGEnvironmentCtrl * controller) :
|
||||||
station_elevation_ft(0.0),
|
station_elevation_ft(0.0),
|
||||||
_controller( controller ),
|
_controller( controller ),
|
||||||
snd_lightning(NULL),
|
snd_lightning(NULL),
|
||||||
|
clouds_3d_enabled(false),
|
||||||
last_scenario( "unset" ),
|
last_scenario( "unset" ),
|
||||||
last_env_config( new SGPropertyNode() ),
|
last_env_config( new SGPropertyNode() ),
|
||||||
last_env_clouds( new SGPropertyNode() )
|
last_env_clouds( new SGPropertyNode() )
|
||||||
|
|
|
@ -540,7 +540,9 @@ void HUD::Ladder::draw(void)
|
||||||
// draw numbers
|
// draw numbers
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
str << i;
|
str << i;
|
||||||
const char *num = str.str().c_str();
|
// must keep this string, otherwise it will free the c_str!
|
||||||
|
string num_str = str.str();
|
||||||
|
const char *num = num_str.c_str();
|
||||||
int valign = numoffs.y > 0 ? BOTTOM : numoffs.y < 0 ? TOP : VCENTER;
|
int valign = numoffs.y > 0 ? BOTTOM : numoffs.y < 0 ? TOP : VCENTER;
|
||||||
draw_text(lo.x - numoffs.x, lo.y + numoffs.y, num,
|
draw_text(lo.x - numoffs.x, lo.y + numoffs.y, num,
|
||||||
valign | (numoffs.x == 0 ? CENTER : numoffs.x > 0 ? RIGHT : LEFT));
|
valign | (numoffs.x == 0 ? CENTER : numoffs.x > 0 ? RIGHT : LEFT));
|
||||||
|
|
Loading…
Reference in a new issue