An AutoTrim function automatically adjusts the trim of the elevator of a
simulated aircraft to compensate for pitching moments that are not caused
by a user affirmatively controlling the elevator. A flight simulator
program determines a sum of the pitching moments acting on the simulated
aircraft, excluding the user setting of the elevator. The sum of the
longitudinal pitching moments is then set equal to zero to solve for a
desired position for setting the AutoTrim control. A time lag is applied
in setting the AutoTrim control to the desired position, to provide
greater realism. Use of the AutoTrim control provides enhanced control
authority to the user in controlling the longitudinal pitch of the
aircraft. The AutoTrim control functionality is stopped as the angle of
attack of the aircraft approaches a stall condition, but resumes when the
plane is flying in a substantially safer flight condition.