mockingbirdnest / Principia

𝑛-Body and Extended Body Gravitation for Kerbal Space Program
MIT License
755 stars 68 forks source link

Suggestion: don't remove the last manœuvre node from the navball #2324

Open SirMortimer opened 4 years ago

SirMortimer commented 4 years ago

Don't delete the last manœuvre node from the navball until the node is deleted from the flight plan (or the flightplan itself is deleted, obviously).

Rationale: Having the blue indicator available after burn can be very helpful for course corrections with RCS afther the node, to compensate for too short or long burns, do some minor adjustments - and it would help immensely with kOS.

Often I use kOS for node execution with principia. Once my manœuvre is all set up, I type this into the console: sas off. lock steering to nextnode:deltav. Then I wait until principia tells me to ignite the engine, and do this... lock throttle to 1. wait 231.4. lock throttle to 0. unlock all. Problem is, once the burn duration (231.4 seconds) is up, the navigation node is deleted by principia, causing kOS to panic and nope out of program execution.

PS: having a way to get principias burn duration and ignition time for the next node into kOS would be really cool :)

sthalik commented 4 years ago

In addition to kOS, issue exists when not burning full throttle for additional precision. MJ disables stability augmentation entirely, causing imprecision. Even when keeping the last known node position (either SAS or KILL ROT), it drifts off designated prograde/retrograde et al. markers.

vladtcvs commented 4 years ago

With kOS you can remember direction and delta-v in variable

vladtcvs commented 4 years ago

issue exists when not burning full throttle for additional precision.

Agree. When you finishing burn, it's better to smoothly decrease throttle, for more precise delta-v. But maneuver point on navball already disappeared.

sthalik commented 4 years ago

This isn't a problem whatsoever on kOS. You need to lock steering to the moral equivalent of,

function node_steering {
  if not HASNODE
    return SHIP:FACING:FOREVECTOR.
  return NEXTNODE:DELTAV:DIRECTION
}

Once you start the burn,

wait until not HASNODE or NEXTNODE:ETA > 1.

The second part of this condition corresponds to having more than one maneuver stored.

This makes the burn script significantly simpler than the equivalent not using Principia.