Wasn't there a space probe to Mars that went spectacularly tits up because someone used imperial measurements instead of metric?
Yes, the Mars Climate Orbiter which entered the Martian atmosphere on the wrong trajectory and burnt up, due to a major units error.
The primary cause of this discrepancy was that one piece of ground software supplied by Lockheed Martin produced results in a United States customary unit ("American"), contrary to its Software Interface Specification (SIS), while a second system, supplied by NASA, that used those results expected them to be in metric units, in accord with the SIS. Software that calculated the total impulse produced by thruster firings calculated results in pound-seconds. The trajectory calculation used these results to correct the predicted position of the spacecraft for the effects of thruster firings. This software expected its inputs to be in newton-seconds.