Family edition
Moon Landing Lab: As Hard as You're Off, the Hover Throttle
In Moon Landing Lab your child writes the landing program for a lunar lander, first in Blocks and then in Python, and tunes it to land softly on as little fuel as possible.
What you need
- A computer or Chromebook with a current browser.
- The link: mytekdev.com/try/moonlandinglab?lesson=as-hard-as-youre-off-the-hover-throttle&ref=fam-moonlandinglab-2. No account, no email and nothing to install.
Before you start: try it once yourself
Open mytekdev.com/try/moonlandinglab?lesson=as-hard-as-youre-off-the-hover-throttle&ref=fam-moonlandinglab-2. A short guide opens over Level 4, As hard as you're off. The Moon's gray ground fills the view in low sunlight, with Earth in the black sky. The lander hangs 500 m up. The readout gives the height, the speed (up or down), the throttle and the fuel. The box at the top says the level's goal and, after each run, what happened and why, with the run's own numbers. The strip under the scene draws the height and the speed as the lander comes down, with a line at 3.05 m/s, the fastest the legs take.
- The starter. In Blocks: when started, forever, set the throttle to (-2 - speed) x 5. Press play: the lander settles near 8 m/s down and hits at 8.22 m/s after 64.4 seconds.
- Gain 50. Change the 5 to 50: it lands at 2.58 m/s after 192.5 seconds, using 858 kg. The level passes, and the box points out that the speed settled at 2.58, not 2.
- Level 5. Next. The same blocks land at 2.58, and this level wants 2.0 within 0.1. In Python, Start from my blocks puts the blocks' line in the editor; change it to lander.throttle(lander.hover_throttle() + (-2 - lander.speed()) * 10). It lands at 2.00 after 252.5 seconds, using 1,112 kg.
- Speed. Speed up and Slower, under the scene, change how fast time runs, up to 16 times. The landing comes out the same at any speed, because the program runs on the lander's own clock. The round play button runs the program from the start; the arrow beside it puts the lander back, hovering 500 m up. The descent has no randomness: the same program lands the same way on every run and every computer.
- Numbers to expect. Level 4 gains: 5 hits at 8.22; 10 hits at 5.04; 20 hits at 3.49; 30 lands at 2.98; 50 at 2.58; 100 at 2.28. Level 5 with the hover throttle at gains of 2, 5, 20 or 50: 2.00 every time. Level 6 with the Level 5 program: 2.00 on 1,112 kg, refused. With the shrinking target: 1.00 after 53.8 s on 248 kg. With 0.05 in place of 0.1: 1.00 after 84.8 s on 389 kg; 0.2: 2.07 on 162 kg; 0.3: hits at 6.47. The slowest speed 2 in place of 1: 2.00 on 221 kg. The fastest 10 in place of 20: 1.00 on 326 kg.
The ideas, in plain words
Proportional control sets the push in proportion to the error: here, how far the speed is from -2 m/s. It is the first thing a control engineer tries, and it has a known flaw. To hold the lander up the engine needs about 30% throttle, and with throttle = gain x error that takes an error of 30 / gain. So the speed settles off target: about 6 m/s off with a gain of 5, about 0.6 m/s with 50. A bigger gain shrinks the error but never removes it.
The hover throttle removes it. It is the throttle at which the thrust equals the weight, so the forces are balanced and the speed does not change: mass x 1.62 / 45,040 x 100, about 32% with full tanks. Starting from it, the correction only has to fix the speed, and the speed comes out exact. The lander is our own uncrewed design, sized from the Apollo Lunar Module's numbers: 7,400 kg empty with 1,500 kg of fuel, an engine of 45,040 newtons that runs from 10% to full, and legs that take a touchdown at 3.05 m/s down. A hard landing folds the legs, and that is all.
Every second above the ground costs fuel, whatever the throttle does, which is why Level 6 comes down fast while high and slowly near the ground. Apollo's last landing phase held a descent rate the commander could step by 0.3 m/s, and the Lunar Module touched down at 0.52 m/s.
Guidance engineers write programs like these. The Apollo landing programs came from MIT's Instrumentation Lab, and their last phase held a descent rate the commander could step by 0.3 m/s. Aerospace engineers earned a median of $134,960 in May 2025 (U.S. Bureau of Labor Statistics), and guidance, navigation and control is one of their specialties.
Do it together
- Open mytekdev.com/try/moonlandinglab?lesson=as-hard-as-youre-off-the-hover-throttle&ref=fam-moonlandinglab-2 together and press play. Watch the speed on the strip under the scene.
You'll know it worked when: The speed settles at about 8 m/s down and the lander hits, at 8.22 m/s.
- In Blocks, change the 5 to 50. Go back to Simulator, press Speed up a few times, and play.
You'll know it worked when: A soft landing at 2.58 m/s: closer to 2, but not on it.
- Press Next: Level 5 and play. Then open Python, press Start from my blocks, and change the line to lander.throttle(lander.hover_throttle() + (-2 - lander.speed()) * 10). Play again.
If you get stuck: Count the brackets: every ( needs its ).
You'll know it worked when: Exactly 2.00 m/s, but the box says it used 1,112 kg of fuel.
- Press Next: Level 6 and play the same program.
You'll know it worked when: Soft, but refused: this level allows less than 400 kg.
- Put the two lines from the hint in the box into the loop: a target speed of -(height x 0.1), never faster than -20 and never slower than -1. Play.
You'll know it worked when: 1.00 m/s after 53.8 seconds, on 248 kg of fuel.
- Change the 0.1 to 0.2, then to 0.3.
You'll know it worked when: 0.2 lands at 2.07 m/s on only 162 kg; 0.3 comes down too fast and hits at 6.47.
Talk about it
Ask these while you work together. A child who has understood it can answer them without help:
- The speed is -5. What is the error, and what throttle does a gain of 5 give?
- Why did gain 5 settle at about 8 m/s, not 2?
- Why did gain 50 land at 2.58, not 2.00?
- What does the hover throttle hold up?
- Why does Level 6 use less fuel than Level 5?
For younger and older kids
Younger: For a younger child, stay in Blocks on Level 4 and try the gains 10, 20, 30 and 50, writing down each landing.
Older: For an older child, open Level 9 and run the Level 6 program with the slow engine. Then try Lander, Configurator with less fuel.
Keep going
- On Level 6, change the slowest speed from 1 to 2, and the fastest from 20 to 10. Which saves fuel, and which costs it?
- Open Level 9, The engine is slow, and run the Level 6 program there. Does it still land?
- Write the Level 6 rule in Blocks with the constrain block in Math.
Bring it into other subjects
- Math: make a table of the error and the throttle for speeds of 0, -2, -4, -6 and -8 with a gain of 5. Graph it: what shape is it?
- Physical science: draw the force arrows at hover, at full throttle and with the engine off.
- Technology: find other machines that use proportional control, such as cruise control or a thermostat that can heat a little or a lot.
- Careers: look up what a control engineer does.
For your records
Ready to copy into an hour log, a portfolio or a transcript.
| Lesson | Moon Landing Lab: As Hard as You're Off, the Hover Throttle |
|---|---|
| Subjects | Computer science |
| Time | 45 minutes |
| What we did | Programmed a simulated lunar lander's landing program in Blocks and Python: set the throttle by how far off the speed was, tested the gain at six values, added the hover throttle, and shaped the descent to land on 248 kg of fuel. |
| Skills practiced | Proportional control; Testing a program; Balanced forces |
Moon Landing Lab: As Hard as You're Off, the Hover Throttle
Activity sheet (optional)
Name: ______________________________ Date: ______________
Open the app: scan the QR code, or go to mytekdev.com/try/moonlandinglab?lesson=as-hard-as-youre-off-the-hover-throttle
Essential question: How does a program decide how hard to push?
Warm-up: Riding a bike down a hill at walking speed: how hard do you squeeze the brakes, and when? ________________________
- Vocabulary. Throttle, target speed, error, gain, proportional control, hover throttle: write each in your own words.
- My gain table (Level 4). Gain 5: ____. 10: ____. 20: ____. 30: ____. 50: ____. 100: ____.
- Level 5. Gain 50 with no hover throttle: ____ m/s. With the hover throttle: ____ m/s, using ____ kg of fuel.
- Level 6. The Level 5 program: ____ kg. The shrinking target: ____ m/s on ____ kg. With 0.05: ____. With 0.2: ____.
1. Why does the speed settle off target without the hover throttle?
2. Why does coming down fast while high, and slowly near the ground, save fuel?
Quick check
Name: ______________________________
1. The target is -2 m/s and the lander is falling at 6 m/s (speed -6). The error is: (A) -8 (B) 4 (C) 6
2. Adding the hover throttle lands the lander at exactly 2.00 m/s because: (A) it is a bigger gain (B) it holds the weight up, so the correction only fixes the speed (C) it turns the engine off
3. A friend's lander lands softly but uses too much fuel. Use what you learned today to say what to change, and why.
Answers
| Question | Answer | Why |
|---|---|---|
| 1 | B | -2 - (-6) = 4: the lander is 4 m/s too fast, so the throttle goes up. |
| 2 | B | The hover throttle balances the weight; the correction is then 0 when the speed is right. |
| 3 | Open answer | Come down faster while high and slow down near the ground, for example a target speed that shrinks with the height: every second in the air costs fuel. |
If your state or umbrella school asks, this lesson covers CSTA 2017 2-AP-12, CSTA 2017 2-AP-17, NGSS MS-PS2-2.
Moon terrain in the pictures: NASA/GSFC/Arizona State University (LROC NAC terrain model and orthophoto of the Apollo 11 site).