Closed Crzyrndm closed 8 years ago
Should be taken care of in the latest dev build.
Doesn't appear to be working as expected. With a Surface velocity of 300m/s and altitude of 1000m at the KSC (density from FAR GUI = 0.995) IAS => 12.2m/s EAS => 7.5m/s
An install of 1.15.4 in the same conditions gives results of: IAS => 456.0m/s EAS => 282.3m/s
And the values if getCurrentDensity is replaced by vessel.atmDensity IAS => 436.9m/s EAS => 270.5m/s
There, should be fixed. Forgot a factor of 1000 in the calculation.
The result remains significantly different than previous implementations. Launching just the Aeris 3A up to 1000m at the KSC, the part averaged density is 0.7744, density calculated from vessel dynamic pressure (replacing part average) or vessel.atmDensity both give 0.9969
EDIT A bit of extra logging shows some parts have a zeroed dynamicPressureKpa property (I'm assuming the landing gear since there was 3)
Alright, I think it's due to parts with physics disabled, so I removed them from the calculation. That should finally fix everything.
One final (hopefully) issue, it's still averaging by the number of parts on the vessel, not the number of valid parts
... I am clearly not a smart man. Should be fixed.
Verifying that it appears to behave as expected
FAR's "GetCurrentDensity" method used for the IAS/EAS speed transforms returns a constant value per body. https://github.com/ferram4/Ferram-Aerospace-Research/blob/master/FerramAerospaceResearch/FARGUI/FARFlightGUI/AirspeedSettingsGUI.cs#L163
With the thermal system in play, atmospheric density now depends on location as well as altitude (which this method doesn't account for), yes?