diff --git a/lib/navigation.ks b/lib/navigation.ks index c64a91e..9045e1f 100644 --- a/lib/navigation.ks +++ b/lib/navigation.ks @@ -22,9 +22,10 @@ function CreateCircularizationNode { parameter nodeAtPeriapsis is false. local dt is choose SHIP:ORBIT:ETA:PERIAPSIS if nodeAtPeriapsis else SHIP:ORBIT:ETA:APOAPSIS. + local a is choose SHIP:ORBIT:PERIAPSIS if nodeAtPeriapsis else SHIP:ORBIT:APOAPSIS. local t is TIME + dt. - local Vc is sqrt(SHIP:BODY:MU/(SHIP:BODY:RADIUS + SHIP:ORBIT:APOAPSIS)). + local Vc is sqrt(SHIP:BODY:MU/(SHIP:BODY:RADIUS + a)). local dV is Vc - VelocityAt(SHIP, t):ORBIT:MAG. local n is Node(t, 0, 0, dV).