Bug fixes for JSBSim atmosphere model at very high altitudes
* Disables dew point transmission as the humidity model is not handling the case where the vapor saturation pressure gets higher than the ambient pressure. * Removed computations for temperatures at very high altitudes as they don't match with the rest of JSBSim atmosphere model.
This commit is contained in:
parent
b0e157dd88
commit
8e05816b43
2 changed files with 6 additions and 30 deletions
|
@ -697,8 +697,8 @@ bool FGJSBsim::copy_to_JSBsim()
|
|||
|
||||
Atmosphere->SetTemperature(temperature->getDoubleValue(), get_Altitude(), FGAtmosphere::eCelsius);
|
||||
Atmosphere->SetPressureSL(FGAtmosphere::eInchesHg, pressureSL->getDoubleValue());
|
||||
static_cast<FGStandardAtmosphere*>(Atmosphere)->SetDewPoint(FGAtmosphere::eCelsius,
|
||||
dew_point->getDoubleValue());
|
||||
// static_cast<FGStandardAtmosphere*>(Atmosphere)->SetDewPoint(FGAtmosphere::eCelsius,
|
||||
// dew_point->getDoubleValue());
|
||||
|
||||
Winds->SetTurbType((FGWinds::tType)TURBULENCE_TYPE_NAMES[turbulence_model->getStringValue()]);
|
||||
switch( Winds->GetTurbType() ) {
|
||||
|
|
|
@ -254,36 +254,12 @@ double FGStandardAtmosphere::GetTemperature(double altitude) const
|
|||
|
||||
double FGStandardAtmosphere::GetStdTemperature(double altitude) const
|
||||
{
|
||||
double Lk9 = 0.00658368; // deg R per foot
|
||||
double Tinf = 1800.0; // Same as 1000 Kelvin
|
||||
double temp = Tinf;
|
||||
double GeoPotAlt = GeopotentialAltitude(altitude);
|
||||
|
||||
if (altitude < 298556.4) { // 91 km - station 8
|
||||
if (GeoPotAlt >= 0.0)
|
||||
return StdAtmosTemperatureTable.GetValue(GeoPotAlt);
|
||||
|
||||
double GeoPotAlt = GeopotentialAltitude(altitude);
|
||||
|
||||
if (GeoPotAlt >= 0.0)
|
||||
temp = StdAtmosTemperatureTable.GetValue(GeoPotAlt);
|
||||
else
|
||||
temp = StdAtmosTemperatureTable.GetValue(0.0) + GeoPotAlt*LapseRates[0];
|
||||
|
||||
} else if (altitude < 360892.4) { // 110 km - station 9
|
||||
|
||||
temp = 473.7429 - 137.38176 * sqrt(1.0 - pow((altitude - 298556.4)/65429.462, 2.0));
|
||||
|
||||
} else if (altitude < 393700.8) { // 120 km - station 10
|
||||
|
||||
temp = 432 + Lk9 * (altitude - 360892.4);
|
||||
|
||||
} else if (altitude < 3280839.9) { // 1000 km station 12
|
||||
|
||||
double lambda = 0.00001870364;
|
||||
double eps = (altitude - 393700.8) * (20855531.5 + 393700.8) / (20855531.5 + altitude);
|
||||
temp = Tinf - (Tinf - 648.0) * exp(-lambda*eps);
|
||||
|
||||
}
|
||||
|
||||
return temp;
|
||||
return StdAtmosTemperatureTable.GetValue(0.0) + GeoPotAlt*LapseRates[0];
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
Loading…
Add table
Reference in a new issue