Mars Climate Orbiter: lost in translation between two units
One program wrote pounds, the next read newtons. Nine months of tiny pushes, each counted at a quarter of its size, flew a NASA spacecraft into Mars. Fly the cruise yourself.
- Ref
- EP-02
- Date
- Module
- Post-Mortem Lab
- Source
- ep-02
▶ Watch · the episode
On 23 September 1999, after nine and a half months in space, NASA’s Mars Climate Orbiter fired its engine to slip into orbit around Mars. It went behind the planet 49 seconds earlier than expected and was never heard from again.
Navigation had aimed for a closest approach of 226 km above the surface. The spacecraft actually came in at about 57 km, too deep in the atmosphere to survive. The reason was one number, written in one unit and read in another.
Fly it
Press Fly. The dashed line is where navigation believed the spacecraft was heading. The solid line is where it was really heading. Watch the gap grow, push by push. Then try newton-seconds, rarer firings, or the unit check.
- Navigation expects
- 226 km
- Really heading for
- 226 km
- Thruster pushes so far
- 0
- Each push counted at
- full size
What happened
Every step comes from the board’s report.
- Two teams, one file. Each time the thrusters fired, ground software called SM_FORCES wrote the size of the push into a file. The navigation team read that file to keep track of the spacecraft’s path.
- The file had the wrong unit. The written agreement between the two programs, the interface specification, said newton-seconds. SM_FORCES wrote pound-force seconds.
- The reader assumed. Navigation used the numbers as newton-seconds, exactly as the specification promised. So every push was counted at 1/4.45 of its real size. The spacecraft’s own software used the right units; only this ground program was wrong.
- More pushes than planned. The solar panel stuck out on one side, so sunlight spun the wheels up faster and the thrusters fired 10 to 14 times more often than navigation expected. Each firing added a little unseen error.
- Hard to see from Earth. The pushes were mostly sideways to the line between Earth and the spacecraft, and radio tracking mostly measures motion along that line. So the error stayed hidden.
- Warnings, but no action. From April 1999, navigators noticed the pushes looked too small, but it was only raised informally. In the last week, estimates of the closest approach dropped from 226 km to 150–170 km, then to 110 km an hour before arrival. An emergency correction was discussed but never made.
Fix it
| Fix | What changes |
|---|---|
| Write newton-seconds, as the specification said | Navigation counts every push at full size; the spacecraft arrives at 226 km |
| Navigation checks the unit before using a number | The very first file is flagged, converted, and the mistake is found on day two |
The second fix is the one that scales: it doesn’t rely on every writer getting it right. In the lab’s toolkit it’s a
few lines: every impulse carries its unit, and expectUnit refuses one it wasn’t promised.
Try one more thing in the demo: keep the wrong units, but make the firings as rare as expected. The spacecraft survives. The bug was there from launch; how often the code ran decided whether it was fatal.
What I simplified
The board’s report gives the factor, the dates and the altitudes, but not the size of each push or the exact number of firings. This simulation uses illustrative values for both and assumes lost altitude grows with the total uncounted push, calibrated so the as-flown run arrives at 57 km. “As expected” firings are 12× rarer, inside the report’s 10–14×.
Further reading
Primary sources first. Everything here is free to read or watch.
- ReportMars Climate Orbiter Mishap Investigation Board: Phase I ReportNASA, 1999
- ArticleMars Climate Orbiter Failure Board Releases Report (press release)NASA, 10 Nov 1999
- VideoWhen NASA Lost a Spacecraft Because It Didn't Use MetricScientific American (YouTube)
- VideoLearning from the $125 Million Mars Climate Orbiter MistakeFilip Van Laenen · ACCU 2019 (YouTube)