I have been trying to figure out the exact landing burn altitude for my hoverslam script and I can't work it out accurately. I've looked at others' script but does not seem to work well with my script.
lock burnAlt to (ship:velocity:surface:mag^2)/(2*(ship:sensors:acc:mag)).
This is what I use to determine the landing burn altitude. And my condition is:
if trueRader <= burnAlt {
set autoThrottle to hoverslam.
} else {
set autoThrottle to 0.
}
From what i understand from this condition, the throttle should be never 0 whenever it is below and equal to burnAlt unless otherwise. But that's the problem, the burnAlt decreases as the rocket throttling up. Do I need to use constant to find my landing burn altitude or something else that is more efficient?
P.S: This does not account for aerodynamic drag nor that it need to be accounted for as I'm playing stock and not RSS/FAR.