1. A method to level an inertial reference system of a helicopter with reference to a local vertical frame, the method comprising: powering up the helicopter, wherein the inertial reference system comprises at least one gyroscope and at least one accelerometer aligned to a body frame of the helicopter; sensing, by the inertial reference system, rotational and translational motion of the helicopter in three dimensions; outputting sensor data from the at least one gyroscope and the at least one accelerometer to a mode-selecting processor, wherein the sensor data comprises measurements of the rotational and translational motion of the helicopter in three dimensions; executing a fast Fourier transform algorithm on the sensor data at the mode-selecting processor; sensing which one of a plurality of operation modes of the helicopter is a current-operation mode based on the execution of the fast Fourier transform algorithm; and after the current-operation mode of the helicopter is determined, executing with the mode-selecting processor a leveling algorithm defined for use with the current-operation mode to estimate a roll and a pitch angle, wherein for each of the plurality of operation modes there is available at least one leveling algorithm; wherein the inertial reference system translates the rotational and translational motion of the helicopter in three dimensions into the local vertical frame based on the current-operation mode of the helicopter to level the inertial reference system, wherein the local vertical frame includes one axis parallel to a gravitation field in a vicinity of the helicopter.