public ManeuverNode GetManeuverNode() { if (payload == null || node?.nextPatch == null) { return(null); } var remainingDeltaV = node.nextPatch.GetFrameVelAtUT(node.UT) - payload.orbit.GetFrameVelAtUT(node.UT); var newNode = new ManeuverNode { UT = node.UT, DeltaV = Utils.Orbital2NodeDeltaV(payload.orbit, remainingDeltaV, node.UT), patch = new Orbit(payload.orbit), nextPatch = new Orbit(node.nextPatch) }; Utils.Debug($"new node: {newNode.ToConfigString()}\norbDeltaV: {Utils.Node2OrbitalDeltaV(newNode)}\nnode burn vector: {Utils.formatVector(node.GetBurnVector(payload.orbit))}\nnew node burn vec: {Utils.formatVector(newNode.GetBurnVector(payload.orbit))}"); return(newNode); }