Skip to content

Commit

Permalink
Revert "Fix bug in Lunar: wrong capsule weight."
Browse files Browse the repository at this point in the history
This reverts commit 52e1bf4.

The original commit modified the game away from what was in BASIC Computer
Games, replacing it with the value from the original FOCAL version.  The
difference was intentional, as the introductory text makes clear, which is also
in the README.md here:

"To make the landing more of a challenge, but more closely approximate the real
Apollo LEM capsule, you should make the available fuel at the start (N) equal to
16,000 lbs, and the weight of the capsule (M) equal to 32,500 lbs."

Here we bring the value back into line with the BASIC Computer Games book & the
README.md text.  If we wanted to keep the FOCAL value, we should update the text
in the README.md to explain why.

See issue coding-horror#867
  • Loading branch information
martincmartin committed May 31, 2024
1 parent 456f228 commit a2215f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 59_Lunar_LEM_Rocket/javascript/lunar.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function main()
print("\n");
a = 120;
v = 1;
m = 32500;
m = 33000;
n = 16500;
g = 1e-3;
z = 1.8;
Expand Down
2 changes: 1 addition & 1 deletion 59_Lunar_LEM_Rocket/lunar.bas
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
110 PRINT: PRINT: PRINT: PRINT "GOOD LUCK"
120 L=0
130 PRINT: PRINT "SEC","MI + FT","MPH","LB FUEL","BURN RATE":PRINT
140 A=120:V=1:M=32500:N=16500:G=1E-03:Z=1.8
140 A=120:V=1:M=33000:N=16500:G=1E-03:Z=1.8
150 PRINT L,INT(A);INT(5280*(A-INT(A))),3600*V,M-N,:INPUT K:T=10
160 IF M-N<1E-03 THEN 240
170 IF T<1E-03 THEN 150
Expand Down
2 changes: 1 addition & 1 deletion 59_Lunar_LEM_Rocket/python/lunar.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def advance(self, delta_t: float) -> None:
class Capsule:
altitude: float = 120 # in miles above the surface
velocity: float = 1 # downward
m: float = 32500 # mass_with_fuel
m: float = 33000 # mass_with_fuel
n: float = 16500 # mass_without_fuel
g: float = 1e-3
z: float = 1.8
Expand Down

0 comments on commit a2215f4

Please sign in to comment.