MechJeb2

MechJeb2

4M Downloads

Resonant orbit maneuver does not work correctly for some schedule timings

Genhis opened this issue ยท 2 comments

commented

MechJeb version

2.9.2 and 2.11.0 (tested with both versions)

KSP version

1.10.1

Description

According to the Maneuver Planner, the resonant orbit operation should change my orbital period to a specified resonant value. It also allows me to select when I want to schedule my burn (apoapsis, periapsis, after a fixed time). When I select apoapsis, it works perfectly, but for other options the resulting orbital period is less than expected.

Replication case

  1. Have a vessel in elliptical Kerbin orbit. My testing vessel had these parameters: apoapsis=1,356,324; periapsis=196,827; inclination=15.417; orbital_period=1h 30m 00.00s
  2. Schedule a resonant orbit burn at periapsis or after a fixed time. I set my maneuver to have the new orbital period ratio 2/1.
  3. With 2/1 orbital period ratio, the new orbital period should be 3h, right? This is not the case if you don't schedule your burn at apoapsis. I achieved 1h 53m 20.72s orbital period when I scheduled the burn at periapsis.

The worst time to schedule a burn is at periapsis. The closer the maneuver start gets to apoapsis (if you use "after a fixed time" option), the better it will match 3h orbital period because the planner will schedule a burn with more dV.

commented

This issue still persists, as explained before.
In case of a non-circular orbit, Resonant Orbit creates a correct maneuver only at the apoapsis. The error is larger as the maneuver node is requested closer to the periapsis.

commented

I think this issue can be solved by replacing

public static Vector3d DeltaVToResonantOrbit(Orbit o, double UT, double f)

calculations in favor of a call to

public static Vector3d DeltaVForSemiMajorAxis(Orbit o, double UT, double newSMA)

where
newSMA = ( SMA^3 * f^2 ) ^ (1/3)

I would try it myself but I don't know the language