Merge pull request #6251 from mikeller/fix_disabling_gps_rescue_on_3d
[betaflight.git] / docs / Modes.md
blob1c5dde7ed9ac44c289c07283d84bfb0921177705
1 # Modes
3 Cleanflight has various modes that can be toggled on or off.  Modes can be enabled/disabled by stick positions,
4 auxillary receiver channels and other events such as failsafe detection.
6 | MSP ID  | CLI ID | Short Name | Function                                                             |
7 | ------- | ------ | ---------- | -------------------------------------------------------------------- |
8 | 0       | 0      | ARM        | Enables motors and flight stabilisation                              |
9 | 1       | 1      | ANGLE      | Legacy auto-level flight mode                                        |
10 | 2       | 2      | HORIZON    | Auto-level flight mode                                               |
11 | 3       | 3      | BARO       | Altitude hold mode (Requires barometer sensor)                       |
12 | 4       | N/A    | VARIO      | Unused                                                               |
13 | 5       | 4      | MAG        | Heading lock                                                         |
14 | 6       | 5      | HEADFREE   | Head Free - When enabled yaw has no effect on pitch/roll inputs      |
15 | 7       | 6      | HEADADJ    | Heading Adjust - Sets a new yaw origin for HEADFREE mode             |
16 | 8       | 7      | CAMSTAB    | Camera Stabilisation                                                 |
17 | 9       | 8      | CAMTRIG    | Unused                                                               |
18 | 10      | 9      | GPSHOME    | Autonomous flight to HOME position                                   |
19 | 11      | 10     | GPSHOLD    | Maintain the same longitude/lattitude                                |
20 | 12      | 11     | PASSTHRU   | Pass roll, yaw, and pitch directly from rx to servos in airplane mix |
21 | 13      | 12     | BEEPERON   | Enable beeping - useful for locating a crashed aircraft              |
22 | 14      | 13     | LEDMAX     |                                                                      |
23 | 15      | 14     | LEDLOW     |                                                                      |
24 | 16      | 15     | LLIGHTS    |                                                                      |
25 | 17      | 16     | CALIB      |                                                                      |
26 | 18      | 17     | GOV        | Unused                                                               |
27 | 19      | 18     | OSD        | Enable/Disable On-Screen-Display (OSD)                               |
28 | 20      | 19     | TELEMETRY  | Enable telemetry via switch                                          |
29 | 21      | 20     | GTUNE      | G-Tune - auto tuning of Pitch/Roll/Yaw P values                      |
30 | 22      | 21     | SONAR      | Altitude hold mode (sonar sensor only)                               |
31 | 23      | 22     | SERVO1     | Servo 1                                                              |
32 | 24      | 23     | SERVO2     | Servo 2                                                              |
33 | 25      | 24     | SERVO3     | Servo 3                                                              |
34 | 26      | 25     | BLACKBOX   | Enable BlackBox logging                                              |
35 | 27      | 26     | FAILSAFE   | Enter failsafe stage 2 manually                                      |
36 | 28      | 27     | AIRMODE    | Alternative mixer and additional PID logic for more stable copter    |
38 ## Auto-leveled flight
40 The default flight mode does not stabilize the multicopter around the roll and the pitch axes. That is, the multicopter does not level on its own if you center the pitch and roll sticks on the radio. Rather, they work just like the yaw axis: the rate of rotation of each axis is controlled directly by the related stick on the radio, and by leaving them centered the flight controller will just try to keep the multicopter in whatever orientation it's in. This default mode is called "Rate" mode, also sometime called "Acro" (from "acrobatic") or "Manual" mode, and is active whenever no auto-leveled mode is enabled.
42 If your flight controller is equipped with a 3 axis accelerometer (very likely), then you can enable one of the two available auto leveled flight modes.
44 ## Mode details
46 ### Angle
48 In this auto-leveled mode the roll and pitch channels control the angle between the relevant axis and the vertical, achieving leveled flight just by leaving the sticks centered.
50 ### Horizon
52 This hybrid mode works exactly like the previous ANGLE mode with centered roll and pitch sticks (thus enabling auto-leveled flight), then gradually behaves more and more like the default RATE mode as the sticks are moved away from the center position.
54 ### Headfree
56 In this mode, the "head" of the multicopter is always pointing to the same direction as when the feature was activated. This means that when the multicopter rotates around the Z axis (yaw), the controls will always respond according the same "head" direction.
58 With this mode it is easier to control the multicopter, even fly it with the physical head towards you since the controls always respond the same. This is a friendly mode to new users of multicopters and can prevent losing the control when you don't know the head direction. 
60 ### GPS Return To Home
62 WORK-IN-PROGRESS.  This mode is not reliable yet, please share your experiences with the developers.
64 In this mode the aircraft attempts to return to the GPS position recorded when the aircraft was armed.
66 This mode should be enabled in conjunction with Angle or Horizon modes and an Altitude hold mode.
68 Requires a 3D GPS fix and minimum of 5 satellites in view.
70 ### GPS Position Hold
72 WORK-IN-PROGRESS.  This mode is not reliable yet, please share your experiences with the developers.
74 In this mode the aircraft attempts to stay at the same GPS position, as recorded when the mode is enabled.
76 Disabling and re-enabling the mode will reset the GPS hold position.
78 This mode should be enabled in conjunction with Angle or Horizon modes and an Altitude hold mode.
80 Requires a 3D GPS fix and minimum of 5 satellites in view.
82 ## Airmode
84 In the standard mixer / mode, when the roll, pitch and yaw gets calculated and saturates a motor, all motors
85 will be reduced equally. When motor goes below minimum it gets clipped off.
86 Say you had your throttle just above minimum and tried to pull a quick roll - since two motors can't go
87 any lower, you essentially get half the power (half of your PID gain).
88 If your inputs would asked for more than 100% difference between the high and low motors, the low motors
89 would get clipped, breaking the symmetry of the motor balance by unevenly reducing the gain.
90 Airmode will enable full PID correction during zero throttle and give you ability for nice zero throttle
91 gliding and actobatics. But also the cornering / turns will be much tighter now as there is always maximum
92 possible correction performed. Airmode can also be enabled to work at all times by always putting it on the
93 same switch like your arm switch or you can enable/disable it in air. Additional things and benefits: Airmode
94 will additionally fully enable Iterm at zero throttle. Note that there is still some protection on the ground
95 when throttle zeroed (below min_check) and roll/pitch sticks centered. This is a basic protection to limit
96 motors spooling up on the ground. Also the Iterm will be reset above 70% of stick input in acro mode to prevent
97 quick Iterm windups during finishes of rolls and flips, which will provide much cleaner and more natural stops
98 of flips and rolls what again opens the ability to have higher I gains for some.
99 Note that AIRMODE will also overrule motor stop function! It will basically also act as an idle up switch.
102 ## Auxillary Configuration
104 Spare auxillary receiver channels can be used to enable/disable modes.  Some modes can only be enabled this way.
106 Configure your transmitter so that switches or dials (potentiometers) send channel data on channels 5 and upwards (the first 4 channels are usually occupied by the throttle, aileron, rudder, and elevator channels).
108 _e.g. You can configure a 3 position switch to send 1000 when the switch is low, 1500 when the switch is in the middle and 2000 when the switch is high._
110 Configure your tx/rx channel limits to use values between 1000 and 2000.  The range used by mode ranges is fixed to 900 to 2100.
112 When a channel is within a specifed range the corresponding mode is enabled.
114 Use the GUI configuration tool to allow easy configuration when channel.
116 ### CLI 
118 There is a CLI command, `aux` that allows auxillary configuration.  It takes 5 arguments as follows:
120 * AUD range slot number (0 - 39)
121 * mode id (see mode list above)
122 * AUX channel index (AUX1 = 0, AUX2 = 1,... etc)
123 * low position, from 900 to 2100. Should be a multiple of 25.
124 * high position, from 900 to 2100. Should be a multiple of 25.
126 If the low and high position are the same then the values are ignored.
128 e.g.
130 Configure AUX range slot 0 to enable ARM when AUX1 is withing 1700 and 2100.
133 aux 0 0 0 1700 2100
136 You can display the AUX configuration by using the `aux` command with no arguments.