Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clearscreen.
- print "Steering...".
- SAS off.
- lock steering to nextnode.
- print "Waiting for node".
- wait until NEXTNODE:ETA < 1.
- print "Beginning burn".
- set tvar to 0.
- lock throttle to tvar.
- print "Fast burn.".
- set olddv to nextnode:deltav:mag.
- until (nextnode:deltav:mag < 1 and stage:liquidfuel > 0) or (nextnode:deltav:mag > olddv) {
- set da to maxthrust * throttle / mass.
- set tset to nextnode:deltav:mag * mass / maxthrust.
- if nextnode:deltav:mag < 2*da and tset > 0.1 {
- set tvar to tset.
- }
- if nextnode:deltav:mag > 2*da {
- set tvar to 1.
- }
- set olddv to nextnode:deltav:mag.
- }
- // compensate 1m/s due to "until" stopping short; nd:deltav:mag never gets to 0!
- print "Slow burn.".
- if stage:liquidfuel > 0 {
- wait 1/da.
- }
- lock throttle to 0.
- unlock all.
- print "Done.".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement