Optimization-based gravity-assisted calibration and axis alignment of 9-degrees of freedom inertial measurement unit without external equipment