Ron Jensen:
While troubleshooting the new environment I discovered the metar station elevation (station_elevation_ft) is never being set because there is a local variable that overrides it.
This commit is contained in:
parent
6db8687a75
commit
694cae5e91
2 changed files with 5 additions and 5 deletions
|
@ -268,7 +268,6 @@ FGMetarCtrl::FGMetarCtrl( SGSubsystem * environmentCtrl )
|
|||
metar_valid(false),
|
||||
setup_winds_aloft(true),
|
||||
wind_interpolation_required(true),
|
||||
station_elevation_ft(0.0),
|
||||
// Interpolation constant definitions.
|
||||
EnvironmentUpdatePeriodSec( 0.2 ),
|
||||
MaxWindChangeKtsSec( 0.2 ),
|
||||
|
@ -667,9 +666,11 @@ FGMetarCtrl::update(double dt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
set_temp_at_altitude(temperature_n->getDoubleValue(), station_elevation_ft);
|
||||
set_dewpoint_at_altitude(dewpoint_n->getDoubleValue(), station_elevation_ft);
|
||||
{
|
||||
double station_elevation_ft = station_elevation_n->getDoubleValue();
|
||||
set_temp_at_altitude(temperature_n->getDoubleValue(), station_elevation_ft);
|
||||
set_dewpoint_at_altitude(dewpoint_n->getDoubleValue(), station_elevation_ft);
|
||||
}
|
||||
//TODO: check if temperature/dewpoint have changed. This requires reinit.
|
||||
|
||||
// Force an update of the 3D clouds
|
||||
|
|
|
@ -150,7 +150,6 @@ private:
|
|||
bool setup_winds_aloft;
|
||||
bool first_update;
|
||||
bool wind_interpolation_required;
|
||||
double station_elevation_ft;
|
||||
string metar;
|
||||
double interpolate_prop(const char * currentname, const char * requiredname, double dvalue);
|
||||
double interpolate_val(double currentval, double requiredval, double dvalue);
|
||||
|
|
Loading…
Add table
Reference in a new issue