Code for final project. Inertial navigation chip calibration