Skip to content

Commit 21e2cd1

Browse files
committed
Fix #82: burn time is nan
1 parent a1caa92 commit 21e2cd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

RasterPropMonitor/Core/RPMCEvaluators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ internal NumericVariableEvaluator GetNumericEvaluator(string input, out Variable
947947
{
948948
if (node != null)
949949
{
950-
return comp.actualAverageIsp * (1.0f - Math.Exp(-node.GetBurnVector(vessel.orbit).magnitude / comp.actualAverageIsp / RPMGlobals.gee)) / (comp.totalLimitedMaximumThrust / (comp.totalShipWetMass * RPMGlobals.gee));
950+
return JSIInternalRPMButtons.GetBurnDuration((float)node.DeltaV.magnitude);
951951
}
952952
return double.NaN;
953953
};

RasterPropMonitor/Handlers/JSIInternalRPMButtons.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ public bool ButtonSetWarpRailsModeState()
13661366
return TimeWarp.fetch.Mode == TimeWarp.Modes.HIGH;
13671367
}
13681368

1369-
double GetBurnDuration(float dv)
1369+
public static double GetBurnDuration(float dv)
13701370
{
13711371
var vesselDeltaV = FlightGlobals.ActiveVessel.VesselDeltaV;
13721372
double totalDuration = 0;

0 commit comments

Comments
 (0)