Guest User

KOS set TWR

a guest
Jan 6th, 2016
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Function Findg
  2. {
  3. Parameter A.
  4. Set GM to Constant():G * Body:Mass.
  5. Set R to A + Body:Radius.
  6. Set g to GM/(R^2).
  7. Return g.
  8. }
  9.  
  10. Function SetThrottleTWR
  11. {
  12. Parameter TWR.
  13. If Ship:AvailableThrust > 0
  14. {
  15. Set tVal to TWR * Findg(Altitude) * (Ship:Mass/Ship:AvailableThrust).
  16. If tVal > 1 {Set tVal to 1.}
  17. Lock Throttle to tVal.
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment