Loiter automatically attempts to maintain the current location, heading and altitude. The pilot may fly the copter in Loiter mode as if it were in manual. Releasing the sticks will continue to hold position.
Good GPS position, low magnetic interference on the compass and low vibrations are all important in achieving good loiter performance.
Loiter mode incorporates the altitude controller from AltHold mode. Details for tuning AltHold are on this page.
The pilot can control the copter’s position with the control sticks. In AC3.1 (and above) you may arm in Loiter mode but only once the GPS has 3D lock and the HDOP has dropped to 2.0 or lower.
The maximum horizontal speed of the copter during loiter mode can be adjusted with the Loiter Speed (WPNAV_LOIT_SPEED) parameter. The value is expressed in cm/s so 500 = 5m/s. The maximum acceleration during Loiter mode is always 1/2 of the Loiter speed.
The Loiter PID’s P value is used to convert the horizontal position error (i.e. difference between the desired position and the actual position) to a desired speed towards the target position. It is generally not required to adjust this.
The Rate Loiter PID values are used to convert the desired speed towards the target to a desired acceleration. The resulting desired acceleration becomes a lean angle which is then passed to the same angular controller used by Stabilize mode. It is generally not required to adjust this.
Viewing the loiter’s horizontal performance is best done by downloading a dataflash log from your flight, graph the NTUN message’s DesVelX vs VelX and DesVelY vs VelY. In a good performing copter the actual velocities will track the desired velocities as shown below. X = latitude (so positive = moving North, negative = South), Y = longitude (positive = East, negative = West).
mavgraph.py $LOITER1.BIN "NTUN.DVelX" "NTUN.VelX" --flightmode=apm
mavgraph.py $LOITER1.BIN "NTUN.DVelY" "NTUN.VelY" --flightmode=apm
Checking altitude hold performance is the same as for AltHold mode.
As mentioned above, Loiter mode incorporates the altitude controller from AltHold mode.
The vehicle takes off in the wrong direction as soon as loiter is engaged. The cause is the same as #1 except that the compass error is greater than 90deg. Please try the suggestions above to resolve this.