Octave code for inertial navigation