Atmospheric density conversion in StageStats seems applied twice
lamont-granquist opened this issue · 0 comments
In the calling computer module there's a conversion of 1/1.225
which is equivalent to multiplying by 40/49
:
MechJeb2/MechJeb2/MechJebModuleStageStats.cs
Line 230 in a05edef
Then that atmDensity value goes through all of FuelFlowSimulation and the FuelNode without change as far as I can tell. Ultimately we wind up in the PartExtensions that handle the *AtConditions()
API where it gets multipied again by 40/49
in a few places:
https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/PartExtensions.cs#L84-L86
https://github.com/MuMech/MechJeb2/blob/dev/MechJeb2/PartExtensions.cs#L118
That seems like it is getting double-converted unless I'm missing something this morning and I'm too low on ☕ for this code.