You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(please note any difficulties or challenges in porting here)
38
+
39
+
### LUNAR
40
+
41
+
Variables:
42
+
43
+
`A`: Altitude in miles. Up is positive.
44
+
`V`: Velocity in miles / sec. Down is positive.
45
+
46
+
`M`: Weight of capsule in pounds, both fuel and machine
47
+
`N`: Empty weight of capsule in pounds. So, weight of fuel is M - N.
48
+
49
+
`G`: Gravity in miles / sec^2, down is positive.
50
+
`Z`: Exhaust velocity in miles / sec
51
+
52
+
`L`: time in seconds since start of simulation.
53
+
`K`: Burn rate for this 10 second turn, pounds of fuel per sec
54
+
`T`: Time left in this 10 second turn, in seconds.
55
+
`S`: Burn time in this 10 second turn, input to subroutine 420.
56
+
57
+
Subroutines:
58
+
59
+
330, Apply updates from one call to subroutine 420.
60
+
61
+
370, If you started descending and ended ascending, figure out whether you hit the surface in between.
62
+
63
+
420, Compute new velocity and altitude using the Tsiolkovsky rocket equation for S seconds:
64
+
65
+
`Q`: Fraction of initial mass that's burnt, i.e. 1 - mf / mo, exactly what we need for the Taylor series of `ln` in the rocket equation. Local to this subroutine.
66
+
`J`: Final velocity after S seconds, down is positive. Return value.
67
+
`I`: Altitude after S seconds, up is positive. Return value.
0 commit comments