A mix-up of English and metric units used in calculating trajectory sent the spacecraft too close to Mars.