Betaflight GPS Rescue mode is similar to “Return to Home” on a DJI drone. It is designed to bring your FPV drone back to the launch point and land it automatically using GPS when your video feed or radio signal gets sketchy, or in the event of a failsafe.
Before Betaflight 4.4, Rescue mode was able to bring your quad back close to the launch point, you have to take over control or the drone would just drop to the ground. In the new version, Betaflight has added the ability to land itself!
However it might not land exactly where it took off, the accuracy depends on your GPS. In my testing it’s close enough, usually within 3-5 meters error. It’s an extremely useful feature in Betaflight nonetheless, especially for long range flying, I’ve lost count how many times GPS Rescue mode has saved me in the past.
Anyway, Rescue mode in Betaflight should be treated as experimental. Do not expect to get your quad back every time, there still a chance you might lose your quad.
These are the GPS modules I have been using with good results. I stop using BN180 because it’s not programmable to get better performance.
Beitian BN220 – small and affordable, get it here:
- AliExpress: https://s.click.aliexpress.com/e/_DENus9Z
- Banggood: http://bit.ly/2nD6QxP
- Amazon: https://amzn.to/3Xelr1F
Beitian BN880 – has a built-in compass, bigger but slightly better performance, get it here:
Some flight controllers come with onboard barometers. It’s not required for GPS Rescue mode to work, but it can significantly improve altitude control. Barometer is used to calculate altitude. If you don’t have this, altitude can be calculated from GPS, it’s just won’t be as accurate as having a dedicated barometer. Some FC with built-in barometer are: Rush Digital F722 V2, Speedybee F405 V3 and Speedybee F7 V3. When you are conformal coating your FC, do not coat the Barometer because it has a hole on it, covering the hole will make it stop working properly.
Compass is not required in Betaflight Rescue Mode, direction is calculated from GPS data. Actually I would isable compass (magnetometer) unless you have calibrated it and confirm it’s working as expected, otherwise it might cause more problems than it solves. In my testing, Resuce mode worked just fine without Compass to be honest.
Only from Betaflight 4.4, Rescue mode has the ability to land itself. Follow this tutorial to flash your FC to Betaflight v4.4.
Make sure Accelerometer is enabled (in the Configuration tab in Betaflight configurator), and that Angle mode is working as intended.
And you should Setup GPS module in Betaflight (this tutorial includes all the wiring and basic configurations).
To be able to use GPS Rescue mode, you must have at least 8 GPS satellites before take off (by default). You might be able to get it to work with just 6, but the more satellites the more accurate and reliable Rescue mode will be.
To know how many GPS satellites you have, enable the “GPS Sats” OSD elements.
Alternatively you can check this in the Setup page in Betaflight Configurator (under GPS).
What Happens when Rescue Mode is Activated?
Check out GPS Rescue Mode in action:
There are 5 phases to Rescue.
The quad climbs to the set altitude (or to the maximum altitude during that flight).
The quad turns to home direction.
It starts to fly toward the launch point. It’s not going to be a smooth cruise, it might jiggle left and right as it’s trying to figure out the direction, but it will eventually get home.
It will hover within a 5x5m area of the launch point, and starts to decent slowly. It won’t be a smooth descend, in my experience the quad would actively trying to slow down during descend, and so the motors make pulsating sounds.
When the drone touches the ground and it will disarm automatically. The motors are terminated on impact, not on altitude.
How to Interrupt Rescue Mode
If you activated Rescue mode using a switch, you can take back control by disengaging that switch and resume flying.
If it’s activated by failsafe:
- the pilot must move the sticks more than 30% to regain control after the radio link comes back after a real failsafe
- wobbling sticks is not needed with a switch induced failsafe, just reset the failsafe switch
GPS Rescue Mode Settings
Settings for GPS Rescue mode are available in the Failsafe tab.
To edit the settings, you need to first select “GPS Rescue” under “Stage 2- Settings“. But if you are not ready to use Rescue mode as failsafe method, just change it back to “Drop” after the configuration.
You 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 (this post seems to have been removed, the only resource I can find on github right now is this: https://github.com/betaflight/betaflight/pull/11579).
If after reading the Betaflight WiKi, you still have absolutely no idea what settings you should use, just give the default a try and see what you should change. According to info in the pull request, the default is designed primarily for 5″ freestyle so it might need adjustment on other size drones.
Here I will go through the settings and share with you what values I use on my 5″ freestyle drone and why.
All the settings are also accessible In CLI, enter
get gps_rescue and you will get a whole list of GPS related parameters. But it’s easier to change them in the GUI (in Failsafe tab).
Angle – This is the maximum angle the drone can tilt in degrees. In strong wind, you might need a higher angle to achieve the desired speed. This is especially true for smaller quads. However if the angle is too steep the drone might struggle to stay in the air so it also depends on the power of the quad. If you set a big angle you should expect some overshoot.
If you are not sure, just try the default value and see how it perform in testing.
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.
I just leave it at default, 40, it works well for my 5″.
Initial Altitude (meters) – at what minimum height the drone returns home relative to the take off point. It should be high enough to avoid trees, buildings and power lines. But not too high it takes a long time and too much battery to ascend. I increased it to 50m as we got some tall trees and hills here.
Descend Distance (meters) – at what distance from home our drone starts to descend. I leave it at default.
Minimum distance to home (meters) – The minimum distance to home when rescue mode is allowed. There’s a hard limit in Betaflight 4.4, 20m with 2m altitude, you can’t set it lower than that.
I leave it at default, 30m.
Ground speed (meters/second) – Note when entering this value in GUI, the unit is different than CLI (which is cm/s). This is the speed at which the quad travels during Rescue. The default 5m/s is 18km/h which I find too slow, I doubled that to 10m/s which is 36km/h. The quad’s travel direction would be more accurate and update faster in higher speed (when a compass is not used and the orientation derives from GPS). Do not set it to lower than 2m/s or orientation won’t work.
Throttle minimum, Throttle maximum, Throttle hover – these are the min, max and hover throttle values you want to use during Rescue mode. Set maximum so the quad isn’t too fast/jerky (it should be above your hover point), set min to keep the props spinning at a reasonable rate (it should be lower than your hover point).
To set hover point, you need to determine an accurate value. Test your quad and see at exactly what throttle it hovers (just enough throttle to keep the quad afloat), literally every quad is different. Use the “Throttle %” OSD element to get the exact value instead of just guessing. According to info in the pull request, “the correct value should cause the quad to climb a bit while in level mode… If these values are set too low, the quad will drop early in the rescue – possibly into the water!”.
Ascend rate, Descend rate (meters/second) – pretty self-explanatory. Adjust these based on your environment, weather condition and your quad’s power. I normally just leave it to default for my 5″ and it works pretty well. If you use Li-ion packs or low C-rating LiPo, maybe use a lower Ascend rate.
Minimum Satellites – Your quad won’t arm if the GPS has fewer satellites than this value. The recommended number of Sats is 8 for reliable rescue mode. 5 or 6 might still work, but it will be sketchy. For me it only takes a minute or two to get 10-20 satellites, so I just leave it at the default, 8.
Note that if you take off before the GPS reach the minimum amount of satellites, it won’t know where home is exactly. More satellites means better position accuracy, you can reduce the number of sats but the position accuracy will go down.
By enabling “Allow arming without fix“, you can still arm the quad when satellite locks is below the “minimum Satellites” number. I usually enable this because it’s more flexible – I don’t have to wait around when I just want some quick flights in my familiar local park. But whenever I am flying in a new spot, over water or diving down cliffs, I always wait for satellite lock.
Beware that GPS Rescue WILL NOT work for that flight if you arm before getting a satellite lock (because it doesn’t know the home position).
If you have trouble getting these many sats (or it takes a long time), check out my tutorial on how to boost your GPS receiver performance. Get a new GPS if you must, they only cost $10-$15, a great investment for protecting your $300 quad!
Altitude Mode – it determines the altitude at which the quad returns home.
- Maximum altitude is the highest altitude your quad was flown during flight
- Fixed altitude is just a user defined value
- Current altitude is whatever height that the quad was at when GPS rescue mode was activated
The option depends on your environment. Maximum altitude is probably the safest option in my opinion, but if you flew way too high in that flight, you could be wasting energy climbing back to that altitude when Rescue mode is activated.
Sanity Checks – when set to “ON”, it constantly monitors GPS Rescue mode conditions, for example:
- is GPS still connected
- are we getting good number of satellite fix
- are we at least 100 meters away from home? (distance can be changed)
- 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 to the ground. So yea, it’s not ideal if you are flying over unrecoverable places like ocean or mountains, but generally, it should be on for safety reasons.
The Betaflight wiki also recommends setting Sanity Checks to “Failsafe Only” if you are having trouble with the option “On” during testing. It turns Sanity Checks off when Rescue mode is activated by a switch but only turns it on when it’s in failsafe. This is also my preferred option.
It’s more risky to turn off Sanity Check entirely, you might get an indefinite flyaway. In Betaflight 4.4, there is now a limit of 20s of sanity failure even if all sanity checks are off. It is a safety thing. Never fly with all sanity checks off.
How to Activate GPS Rescue
There are two ways to activate GPS Rescue mode, either by Failsafe, or by a switch on your transmitter.
It’s useful to assign a switch to GPS Rescue as an emergency mode, in situations like losing orientation (e.g. when flying LOS) or your FPV system stops working, you can activate it manually.
Go to the Betaflight Modes tab and add a AUX channel for GPS Rescue Mode.
But the best use for Rescue mode is Failsafe in my opinion. By default your quad just drops to the ground when failsafe happens, how wonderful would it be if it can come back home like a DJI drone? Well here is how to do it.
To set up Rescue mode for failsafe, go to the Failsafe tab in Betaflight Configurator. If you don’t see it, you have to first enable “Expert Mode” option (next to Update Firmware button on the top).
You drone goes into failsafe when you lose radio signal.
In a failsafe there are two stages, your drone will go into Stage 1 first, it will just sits there for a second (Guard Time, you can change how long) before entering Stage 2. This is to see if the signal can come back, if so your control will resume. You can also do different things during Stage 1, like Channel Fall Back (setting each channels to specific values).
If signal doesn’t come back after Stage 1, then it will go into Stage 2 which is GPS Rescue as we have selected above, you quad should now fly home.
It is nice to be able to set GPS Rescue as your failsafe method, but it’s not for everyone as it really depends on the environment. For example I wouldn’t use GPS Rescue mode if I am flying in a forest, bando, stadium 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 it failsafes, the quad will (should) just drop to the ground.
Throttle Channel Fallback
The default Channel Fallback setting for Throttle is “Auto”, which drops the throttle to zero when Stage 1 failsafe is activated. When you change Stage 2 failsafe from the default value “Drop” to “GPS Rescue”, in the event of a failsafe the motors will momentarily stop for the Guard Time (1.5 seconds by default in BF4.4). This might destabilize the quad while GPS Rescue kicks in, and Betaflight thinks there’s something wrong as it fails one of the sanity checks and cause the drone to just drop to the ground.
A workaround would be to set the Throttle Channel Fallback setting from “Auto” to “Hold”, so the throttle value is held at its last commanded position for the Guard Time to avoid the motor stalling.
Even better, I normally set throttle to the hover throttle value, center all the roll/pitch/yaw sticks, and put the quad in Angle mode, so as soon as Failsafe happens the quad just levels out and stays there until Rescue mode kick in (if my radio signal doesn’t come back).
Never set throttle to zero in stage 1 failsafe!
How to Test GPS Rescue
Here’s how I test GPS Rescue.
First of all, assign a switch to GPS Rescue and make sure it can indeed bring your quad home as intended. If anything goes wrong, disengaging the switch should give you full control again.
Next, assign a switch to Failsafe in the Modes tab in Betaflight. It emulates full failsafe mode in Betaflight (just like when you lose RC signal). This is a lot safer than testing by turning off your radio, because you can disengage anytime you want using a switch.
Note that this is only for testing GPS Rescue mode, as soon as you finish testing, you should remove it in the modes tab.
Remove all props, go into the Modes tab and verify that Failsafe mode can actually get activated by the switch. At this point your quad will go into Rescue mode, and your radio controls will be locked out. Now check if you can deactivate failsafe and take back control.
When you are testing this on the bench, with the 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.
It’s useful to have these GPS related info on your OSD, they will help you understand what your quad is doing. You can also have Flight Mode enabled, it’ll say “RESC” when Rescue mode is activated, “Air” when your quad is in rate mode, and “Angle” when it’s in angle mode.
Now test it in an open field with no obstacles and people.
Make sure you have enough locked satellites in the OSD before arming.
Fly in a straight line, 100-200 meters away.
Activate Failsafe mode using the switch, shortly your quad should enter GPS Rescue mode (watch the flight mode in OSD).
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 at the beginning, this is normal. Just make sure the quad isn’t flying the complete opposite direction.
You can quit failsafe mode by flipping the switch at any time and resume full control.
If you don’t disengage, it will carry on flying home. When the quad reaches home, it will hover for a bit and starts to slowly descend but the motors will be pulsating… until it hits the ground and disarms automatically.
Repeat the procedure again and again until you are feeling comfortable with it.
Once you are done with testing, remove Failsafe from the Modes tab.
Words from Betaflight Devs
I recommend 10 satellites. [And] Wait for 30s after [you have] 10 satellites for altitude to stabilise [before taking off].
Always confirm normal GPS Rescue behaviour at the start of a critical flight by testing with the failsafe switch. Set the switch to immediately enter Stage 2. You can enter and leave GPS Rescue via the switch with immediate on and off effect. Check that the quad rotates and flies towards home and does the right things before you are so far away that a true failsafe may occur.
ALWAYS CHECK that the Home Arrow points directly back towards home after takeoff! Sometimes, if you take off and spin around during arming or immediately on takeoff, the quad’s attitude information can become corrupted, and the Home Arrow can point the wrong way. It’s best to arm cleanly and fly away from Home in a straight line at a reasonable speed immediately after takeoff. Watch the Home Arrow carefully to ensure it quickly points back to Home. If the Home Arrow points the wrong way when a failsafe occurs, the GPS Rescue will initially fly off in the wrong direction, and in some cases, you may lose the quad.
Wrong direction in Rescue?
Without a compass, your quad can still work out direction using GPS coordinates. By flying forward the drone can calculate which way it’s going by comparing the current position and the previous position. That’s why at the beginning, your quad might be wandering around or even flying towards the wrong direction but eventually it should correct itself. If your GPS signal is weak or updating too slowly it can take longer to correct.
If you are using a compass and it’s flying the wrong direction, then maybe there’s something wrong with the compass, or maybe it’s not calibrated properly. In this case try turning off the magnetometer (compass) and try again. If it works now, it proves your compass is the source of the problem.
If your yaw is jerky during Rescue mode, your GPS might be updating too slowly (e.g. 1Hz), try to increase it to 5Hz or even 10Hz following this guide (only works on certain GPS modules).
- Oct 2018 – tutorial created
- Aug 2020 – updated, GUI changes, CLI parameter names changes, added throttle min/max/hover values
- Feb 2023 – updated for BF4.4 (with auto landing capability)