From a2215f4f903551fa08debc3efd87c8d035c705a9 Mon Sep 17 00:00:00 2001 From: Martin Martin Date: Fri, 31 May 2024 14:15:52 -0400 Subject: [PATCH] Revert "Fix bug in Lunar: wrong capsule weight." This reverts commit 52e1bf49984960f0030f81bf968029c78b9729c9. 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 #867 --- 59_Lunar_LEM_Rocket/javascript/lunar.js | 2 +- 59_Lunar_LEM_Rocket/lunar.bas | 2 +- 59_Lunar_LEM_Rocket/python/lunar.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/59_Lunar_LEM_Rocket/javascript/lunar.js b/59_Lunar_LEM_Rocket/javascript/lunar.js index 4f693d00..43a0e892 100644 --- a/59_Lunar_LEM_Rocket/javascript/lunar.js +++ b/59_Lunar_LEM_Rocket/javascript/lunar.js @@ -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; diff --git a/59_Lunar_LEM_Rocket/lunar.bas b/59_Lunar_LEM_Rocket/lunar.bas index 256eedff..30133615 100644 --- a/59_Lunar_LEM_Rocket/lunar.bas +++ b/59_Lunar_LEM_Rocket/lunar.bas @@ -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 diff --git a/59_Lunar_LEM_Rocket/python/lunar.py b/59_Lunar_LEM_Rocket/python/lunar.py index fa7da3de..46a06674 100644 --- a/59_Lunar_LEM_Rocket/python/lunar.py +++ b/59_Lunar_LEM_Rocket/python/lunar.py @@ -127,7 +127,7 @@ class SimulationClock: 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