Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION stageISP {
- DECLARE thrustTotal IS 0.
- DECLARE mDotTotal IS 0.
- DECLARE avgISP IS 0.
- LIST ENGINES IN engList.
- FOR eng IN engList {
- IF eng:IGNITION {
- LOCAL t IS eng:MAXTHRUST*eng:thrustlimit/100.
- SET thrustTotal to thrustTotal + t.
- IF eng:VISP = 0 {
- SET mDotTotal to 1.
- }.
- ELSE {
- SET mDotTotal to mDotTotal + t / eng:ISP.
- }.
- }.
- }.
- IF mDotTotal = 0 {
- SET avgISP TO 0.
- } ELSE {
- SET avgISP TO thrustTotal/mDotTotal.
- }
- return avgISP.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement