Skip to content

Commit 9354c76

Browse files
committed
update maneuver required dv during burn (closes #10 )
1 parent abad603 commit 9354c76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MicroEngineerProject/MicroEngineer/MicroEngineerMod.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,8 @@ private void FillManeuver(int _ = 0)
490490
PatchedConicsOrbit newOrbit = activeVessel.Orbiter.ManeuverPlanSolver.PatchedConicsList.FirstOrDefault();
491491
DrawEntry("Projected Ap.", MetersToDistanceString(newOrbit.ApoapsisArl), "m");
492492
DrawEntry("Projected Pe.", MetersToDistanceString(newOrbit.PeriapsisArl), "m");
493-
DrawEntry("∆v required", $"{currentManeuver.BurnRequiredDV:N1}", "m/s");
493+
double requiredDVremaining = (activeVessel.Orbiter.ManeuverPlanSolver.GetVelocityAfterFirstManeuver(out double ut).vector - activeVessel.Orbit.GetOrbitalVelocityAtUTZup(ut)).magnitude;
494+
DrawEntry("∆v required", $"{requiredDVremaining:N1}", "m/s");
494495
double timeUntilNode = currentManeuver.Time - GameManager.Instance.Game.UniverseModel.UniversalTime;
495496
DrawEntry("Time to", SecondsToTimeString(timeUntilNode), "s");
496497
DrawEntry("Burn Time", SecondsToTimeString(currentManeuver.BurnDuration), "s");

0 commit comments

Comments
 (0)