The Metric Mars Mission — Python Bug Hunt

Inspired by the Mars Climate Orbiter, lost in 1999 because one team produced thruster data in pound-force seconds and the other consumed it as newton seconds.

  • Language: Python
  • Layer: Backend
  • Difficulty: Easy
  • Concepts: Units, Conversion
  • Modelled on: NASA · Mars Climate Orbiter
  • Visible tests: the conversion factor is applied; unit impulse converts exactly
  • Reward: 50 XP for a complete fix

Briefing

Inspired by the Mars Climate Orbiter, lost in 1999 because one team produced thruster data in pound-force seconds and the other consumed it as newton seconds. No conversion, no Mars.

thrust.py ingests ground-software impulse readings (lbf·s) for the navigation stack (N·s). It currently forwards the raw number.

Bug report

BUG-MCO-99 · Priority: $327M · Reported by: nav team

to_newton_seconds(lbf_s) must convert using 1 lbf = 4.448222 N and round to 3 decimal places.

Observed: the value passes through unconverted — every burn is ~4.45x weaker than commanded, and the trajectory sinks into the atmosphere.

Logs

[nav] AMD file impulse=100 -> burn planned with 100 N·s (expected 444.822)

The code as shipped

src/nav/thrust.py (editable)

# Converts ground-software impulse (pound-force seconds) to newton seconds.

LBF_TO_N = 4.448222

def to_newton_seconds(lbf_s):
    return lbf_s

Open the hunt to edit the files, run the visible tests and submit against the hidden ones. More Python bug hunts.