File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 2020#region Using Directives
2121
2222using System ;
23+ using System . Linq ;
2324
2425using KerbalEngineer . Extensions ;
2526using KerbalEngineer . Flight . Readouts . Vessel ;
@@ -75,6 +76,8 @@ public static ManoeuvreProcessor Instance
7576
7677 public static double RadialDeltaV { get ; private set ; }
7778
79+ public static double TripDeltaV { get ; private set ; }
80+
7881 public static bool ShowDetails { get ; set ; }
7982
8083 public static double TotalDeltaV { get ; private set ; }
@@ -135,6 +138,12 @@ public void Update()
135138 BurnTime = burnTime ;
136139 HalfBurnTime = midPointTime ;
137140
141+ var tripDeltaV = TotalDeltaV ;
142+ foreach ( var n in FlightGlobals . ActiveVessel . patchedConicSolver . maneuverNodes . Skip ( 1 ) ) {
143+ tripDeltaV += n . DeltaV . magnitude ;
144+ }
145+ TripDeltaV = tripDeltaV ;
146+
138147 ShowDetails = true ;
139148 }
140149
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ static ReadoutLibrary()
9696 readouts . Add ( new SpeedAtApoapsis ( ) ) ;
9797 readouts . Add ( new SpeedAtPeriapsis ( ) ) ;
9898 readouts . Add ( new TimeToAtmosphere ( ) ) ;
99+ readouts . Add ( new TripTotalDeltaV ( ) ) ;
99100
100101 // Surface
101102 readouts . Add ( new AltitudeSeaLevel ( ) ) ;
Original file line number Diff line number Diff line change 8686 <Compile Include =" Flight\Readouts\Orbital\ManoeuvreNode\PostBurnInclination.cs" />
8787 <Compile Include =" Flight\Readouts\Orbital\ManoeuvreNode\PostBurnPeriapsis.cs" />
8888 <Compile Include =" Flight\Readouts\Orbital\ManoeuvreNode\PostBurnPeriod.cs" />
89+ <Compile Include =" Flight\Readouts\Orbital\ManoeuvreNode\TripTotalDeltaV.cs" />
8990 <Compile Include =" Flight\Readouts\Orbital\MeanAnomalyAtEpoc.cs" />
9091 <Compile Include =" Flight\Readouts\Orbital\MeanAnomaly.cs" />
9192 <Compile Include =" Flight\Readouts\Orbital\EccentricAnomaly.cs" />
You can’t perform that action at this time.
0 commit comments