I pulled that verbatim from the AltitudeHold module.