GPS Rescue mode in Betaflight is similar to “Return to Home” on a DJI drone. It is meant to help bail you out when your video feed or radio signal gets sketchy, the quad is supposed to return to you automatically using GPS.
Disclaimer – Rescue mode in Betaflight should be treated as experimental. Do not rely on it and expect to get your quad back every time you lose signal, because you won’t. There have been times it didn’t work properly for me and definitely isn’t as reliable as a DJI drone. But it’s good to have as a last resort.
Rescue mode is like “return to home”, but in its simplest form. The quad doesn’t go back to exactly where it was launched, but rather, close enough so you could get your signal back and regain control. It’s a useful feature to have in Betaflight, especially if you fly long range and it might save your drone one day :)
Check out my other Betaflight Tutorials.
Requirement for GPS Rescue Mode
- Flash your FC to Betaflight 3.5 or newer
- Tutorial: Setup a GPS module on your FC
- Enable Accellerometer (so it can detect the angle of the quad)
This is the GPS module i use, product page – http://bit.ly/2KZcdR7
Barometer is not required, but recommended. It’s used to calculate the altitude of the quad. If you don’t have this, altitude can be calculated with data from the GPS module, but not as accurate as having a barometer. The Kakute F7 FC has barometer built-in.
Compass is not required in Rescue Mode.
GPS Rescue Mode Configuration
Once you have setup GPS module and it’s getting GPS 3D fix (check in Setup page), you can now enable Rescue mode.
You might have to tweak the settings in Betaflight to make it work for your particular setup and environment. Make sure to check out the Betaflight wiki to fully understand what the parameters do: https://github.com/betaflight/betaflight/wiki/GPS-rescue-mode
Settings for GPS Rescue mode are available in the Failsafe page (you need to select Rescue first, if you are not ready to use Rescue as failsafe method just change back to Drop after configuration).
You can also just do it In CLI, enter
get gps_rescue and you will get the list of GPS related parameters. Here I will show you the settings I changed in my quad.
set gps_rescue_min_dth = 100
Minimum distance to home – How far the quad has to be from home before it will activate Rescue mode. Default is 100 meters, but you can reduce it as little as 50 meters. This is to prevent activating Rescue mode when the quad is too close and endangering yourself by flying your quad accidentally to your face :)
set gps_rescue_min_sats = 6
Minimum Satellites – Your quad won’t arm if the GPS has fewer locked on satellites than this parameter, so you might want to set it lower or even zero if you don’t want to wait before every flight. When you want to use GPS, then you just need to wait until it sees enough GPS before taking off. (you can display the number of locked sat in OSD)
set gps_rescue_allow_arming_without_fix = ON in the CLI to allow you to arm without a fix.
Note that if you take off before the GPS sees enough satellites, it won’t know where home is. If you intend to use Rescue mode, best to wait until it sees enough sat. Recommended number of Sats: 6 to 8 for a reliable rescue mode.
set gps_rescue_angle = 40
Angle – It’s in degree. For a smaller quad, you might want to set it to a higher angle than the default 30, in case the quad isn’t strong enough to fight head wind. However if the angle is too steep it might struggle to stay in the air so it really depends on the power of your quad.
You need to enable Accelerometer and need to be calibrated/trimmed properly for this to work accurately. If your ACC is faulty, rescue mode might not work correctly for you. Verify by flying in Angle mode. If so replace FC.
set gps_rescue_descent_dist = 100
Descent Distance (meters) – at what distance from home our drone starts to descent. Enter a distance which you think you should get your signals back reliably.
set gps_rescue_initial_alt = 70
Initial Altitude (meters) – at what minimum height the drone returns home relative to take off point. It should be high enough to avoid trees, buildings and power lines.
Sometimes you might find your drone flies much higher than this number, that’s because altitude will either be this parameter or the maximum altitude recorded during flight +15m which ever is highest.
set gps_rescue_ground_speed = 1500
Ground speed (meters/second) – Note when entering value in GUI, the unit is different in CLI which is cm/s. This is the speed at which the quad travels back. I find the default 20m/s a bit too fast so I set it to half that speed, 10m/s which is about 36km/h.
set gps_rescue_sanity_checks = RESCUE_SANITY_ON
Sanity Checks – Generally speaking, this should be turned on (RESCUE_SANITY_ON). “Sanity Checks” constantly monitors conditions with the GPS, for example:
- is GPS still connected
- are we still getting good number of satellite locks
- In rescue mode are we getting closer to the home, and we didn’t hit an obstacle
If any of these conditions are not met, it will abort rescue mode and your quad will just disarm and drop. So yea, not ideal if you are flying over unrecoverable area like water, but for most cases, it should be on.
The Betaflight wiki also recommends setting Sanity Checks to “Failsafe Only” (RESCUE_SANITY_FS_ONLY) if you are having trouble with the option “On”. It turns Sanity Checks off when Rescue mode is activated by a switch but only turns it on when it’s in failsafe. It’s really a hit and miss issue at the moment, some people decided to just turn it off completely, but beware of the risk by doing so.
set gps_rescue_throttle_min = 1100
set gps_rescue_throttle_max = 1600
set gps_rescue_throttle_hover = 1200
Throttle (min/max/hover) – these are the min, max and hover points of your throttle value you want to use in rescue mode. Set max to a value so the quad isn’t too fast, set min to keep the props spinning at a reasonable rate, and set hover point to just enough to keep the quad afloat.
Activating GPS Rescue Feature
There are two ways to activate GPS Rescue mode, either by Failsafe, or by a switch on your transmitter. I recommend setting it up on a switch first for testing before using it for failsafe.
Go to the Betaflight Modes tab and add a switch/AUX channel for GPS Rescue Mode.
Testing GPS Rescue Mode
Remove all props, verify that the GPS Rescue mode can actually get activated by the switch, and you can deactivate Rescue mode and switch back to acro mode.
When you are testing this on the bench, with USB cable connected, the Rescue mode box won’t turn yellow like other modes. This is fine as long as the small yellow bar can move to the activation range.
Keep in mind that the settings depend on your model and the environment so make sure to test it fully. Do this in an open field without any obstacles and people.
These GPS related elements in your OSD will help you understand what your quad is doing.
Make sure you have enough locked satellites in the OSD before testing. You can also have Flight Mode enabled, it’ll say “RESC” in Rescue mode.
Fly in a straight line, past your descent distance and a bit more. For example, if your descent distance setting is 200 meters, fly 300-400 meters away.
Pay attention to the home arrow in Betaflight OSD, if it’s pointing up, it means you are flying home. If it’s pointing down, means you are flying away from home. The arrow might be pointing the wrong direction from time to time, this is normal. Just make sure the quad isn’t flying the complete opposite direction :)
When the quad gets close enough and you have your signal back, you have to get ready to take over control. Keep the throttle stick around 40-50% (slightly higher than hover point), and the roll and pitch stick at neutral position.
Disengage rescue mode, and now you have full control to the quad as normal.
If you don’t disengage rescue mode and let it fly too close to launch point, it will just start to descend when it hits the “descent distance”.
Repeat the procedure again and again until you are feeling comfortable with it.
Using GPS_Rescue for Failsafe
Once you know it’s working reliably, you may set it up for failsafe. Go to the Failsafe tab in Betaflight Configurator. If you don’t see it, you have to first enable “Expert Mode” first (next to Update Firmware button on the top).
Alternatively you can do that in CLI by entering:
set failsafe_procedure = GPS-RESCUE
Note that your quad will enter rescue mode if RC signal is lost, and it will go back to acro mode as soon as RC signal is restored. At this point it’s possible that your video signal is still lost and you are flying blind!
Therefore it’s important to assign rescue mode to a switch. When failsafe happens, put your switch to rescue mode as well. Only put your switch back to acro mode when you are ready to take over control.
It is nice to be able to set GPS Rescue as your failsafe, but I would reconsider depending on the type of environment we fly in. For example I wouldn’t set it as failsafe if I am flying in forest, or garage.
Imagine losing your control link while under a tree, or inside a building. Your failsafe would kick in, and Rescue mode would immediately send your quad into the branches or the ceiling, which isn’t very helpful!
If you have no GPS fix when failsafe, the quad will just drop.
What Happens when Rescue Mode is Activated?
The quad climbs to the altitude you set, or the highest altitude during flight + 15 meters. Then it starts flying toward where it was launched. It’s not going to be a smooth cruise, instead it might jiggle left or right occasionally but it will eventually get there.
It won’t stop at exactly where it took off, instead, when it reaches the “descent distance” from home, it will start to descent and “land”.
However, don’t rely on Rescue mode for landing, speaking from experience, it’s pretty bad (not what it’s designed for anyway)! You could end up on top of a tree, or just crashed straight into the ground. It simply don’t care what’s underneath, or how high it is from ground.
As soon as you get your video and radio link back, you should take back control and resume your flight.
- Oct 2018 – tutorial created
- Aug 2020 – updated, GUI changes, CLI parameter names changes, added throttle min/max/hover values