VEAS not using ISA Std Day sea-level density? #894
Replies: 6 comments 3 replies
-
This made me chuckle even if it was unintended pun. 😆 Looks like you found an issue. But I'm curious which methods you use to setup a non-standard day? Like you said by default JSBSim uses standard day values and everything is fine: jsbsim/src/models/atmosphere/FGStandardAtmosphere.cpp Lines 133 to 134 in 92fa1ea The issue I assume you mean and the issue I see is when using SetTemperature of FGStandardAtmosphere to change conditions at a flight location. This ends up adding a temperature bias to SLTemperature and then recalculation of Density is called which uses the new offset SLTemperature. void FGStandardAtmosphere::SetTemperature(double t, double h, eTemperature unit)
{
double targetTemp = ConvertToRankine(t, unit);
double GeoPotAlt = GeopotentialAltitude(h);
double bias = targetTemp - GetStdTemperature(h);
if (GeoPotAlt <= GradientFadeoutAltitude)
bias -= TemperatureDeltaGradient * (GradientFadeoutAltitude - GeoPotAlt);
SetTemperatureBias(eRankine, bias);
CalculatePressureBreakpoints(SLpressure);
SLtemperature = GetTemperature(0.0);
CalculateSLSoundSpeedAndDensity();
} Is there a proper way of defining non-standard day conditions? I'm not sure if there are multiple issues or just the one you found. The obvious solution is to hardcode density like you alluded to And if Set Temperature is a correct way of defining local conditions for flying, then should it even be recalculating sea level density at all? Unless this has no affect other than VEAS, which can be fixed easily, then I guess Set Temperature does not need correction, only VEAS does. |
Beta Was this translation helpful? Give feedback.
-
It was intended, good to know it made someone chuckle 😉 Yes, the ways I'm familiar with in terms of setting non-standard conditions is to make use of the temperature setting options: PropertyManager->Tie("atmosphere/delta-T", this, eRankine,
(PMFi)&FGStandardAtmosphere::GetTemperatureBias,
(PMF)&FGStandardAtmosphere::SetTemperatureBias);
PropertyManager->Tie("atmosphere/SL-graded-delta-T", this, eRankine,
(PMFi)&FGStandardAtmosphere::GetTemperatureDeltaGradient,
(PMF)&FGStandardAtmosphere::SetSLTemperatureGradedDelta); And I guess: PropertyManager->Tie("atmosphere/P-sl-psf", this, ePSF,
(PMFi)&FGStandardAtmosphere::GetPressureSL,
(PMF)&FGStandardAtmosphere::SetPressureSL);
Yep, IAS/EAS is very much tied based on calibration etc. to specific earth conditions. Although I guess if a pilot knows the stall speed is 100KIAS on earth they can use the same airspeed indicator while flying the same aircraft on Mars and know they can use the 100KIAS reference for stall? |
Beta Was this translation helpful? Give feedback.
-
It appears all those Set Temp, and Set Pressure functions end up updating SLDensity, affecting VEAS. Before this 2018 update, 3e53a34 Density was not calculated when using set tempertuare/pressure in FGStandardAtmosphere. I guess that leaves the question would creating some new Set Temp/ Set Pressure functions without affecting sea level density be useful or would it just be better to update VEAS to use a new variable that is a "Standard" sea level density, separate from SLDensity. |
Beta Was this translation helpful? Give feedback.
-
I would suggest leaving the jsbsim/src/models/FGAtmosphere.cpp Lines 367 to 381 in 92fa1ea For interest there is an equivalent calculation of EAS making using of |
Beta Was this translation helpful? Give feedback.
-
Will do, although my plan was to wait until PR #885 was resolved. |
Beta Was this translation helpful? Give feedback.
-
FYI I have submitted the PR #909 to fix the very same issue in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
While reviewing PR - #885 I noticed that the calculation for
VEAS
doesn't appear to be using the ISA Std Day sea-level density in it's calculation?jsbsim/src/models/FGAuxiliary.cpp
Line 201 in 92fa1ea
Double-checking
in.DensitySL
it isn't the standard day value, except on a standard day.See EAS formulas - https://en.wikipedia.org/wiki/Equivalent_airspeed
Beta Was this translation helpful? Give feedback.
All reactions