-
-
Save KSAMissionCtrl/55c59e7ea9aa9bd1d0746324b0ab659d to your computer and use it in GitHub Desktop.
Release a rocket from the aircraft if certain conditions are met
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pitch_for { | |
parameter ves. | |
return 90 - vang(ves:up:vector, ves:facing:forevector). | |
} | |
when ship:altitude < 6700 then set release to true. | |
set release to false. | |
set pitch to 0. | |
until false { | |
clearscreen. | |
print pitch_for(ship). | |
if pitch_for(ship) > pitch set pitch to pitch_for(ship). | |
if release = true and ship:altitude >= 7000 and pitch_for(ship) >= 63 and ship:velocity:surface:mag > 70 { | |
stage. | |
set release to false. | |
} | |
print pitch. | |
wait 0.1. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment