GPS Rescue Mode for Betaflight – Setup Guide

DISCLAIMER: this is an experimental feature. Use with extreme caution. This documentation WILL change so check this page often. Do not activate this feature unless:

  • You are in a spot with no people or property within a 50m radius of yourself
  • Have little attachment to your quad
  • Have read this document and fully set up all the required parameters

This is a work in progress by Mike Campbell and myself, contact either of us for questions. Void where prohibited.  Do not taunt happy fun gps rescue.

Download binaries here

If you are reading this, you probably have experienced the feeling. Flying far away when all of a sudden your quad failsafes and you see it drop into the Chasm of Oblivion. Or worse, your video is gone and you do not even know where it may have ended up. That is the motivation for GPS Rescue. Want to set it up? Read on.


  • Any F4 flight controller capable of running Betaflight.
  • A GPS unit mounted on your quad (ublox m8n recommended).
  • (optional) barometer.
  • Familiarity with the Betaflight command line interface.

First, back up your quad configuration (e.g. by running “diff” on the CLI and saving the output to a file). Then, flash the corresponding build on your flight controller. Restore your Betaflight configuration, go to the Betaflight Modes tab and add a switch for GPS Rescue Mode. Verify that the mode actually gets activated (of course no props).

Next, configure the following parameters in the cli:

set gps_rescue_initial_alt=[number] (default is 70)

This is the most important parameter. When Rescue Mode is activated, Your quad will point home and try to climb to this altitude relative to your takeoff point. I personally like to make it 70 or 80 meters.

set gps_rescue_ground_speed=[number] (default is 1500)

This is the speed at which your what will try to come back, in centimeters per second. I like 1500 (about 35 mph), but this setting depends on how and where you fly.

set gps_rescue_angle=[number] (default is 30)

This is the maximum allowed tilt angle for your quad when coming home. This setting may prevent it to reaching full speed, so you may have to experiment with it if you change the defaults. Note that the higher the angle, the harder if will be for the altitude controller to keep a stable altitude. When there is a chance of returning into head winds I like to set this parameter to 45 degrees.

set gps_rescue_descent_dist =[number] (default is 200)

This is the distance at which your quad will start descending towards home.

At this point you are ready to test Rescue Mode. We suggest the following procedure:

  1. Wait for your gps to get a good fix.  By default your quad will not arm if you have less than gps_rescue_min_sats. You can decrease this value in the CLI or even make it 0 if you just want to fly near yourself. However, I would not take off with less than 6 satellites if I there is a chance that I may need GPS rescue later in the flight.
  2. Fly in a straight line for at least 100 meters past your descent distance. For example, if your descent distance setting is 150 meters, fly to 250 meters. As you fly, the home arrow should adjust to point towards home. VERY IMPORTANT: if your arrow does not point towards home, DO NOT activate GPS Rescue. Your quad will try to fly in the direction of the arrow if you do.
  3. Activate GPS Rescue. IMPORTANT: be ready to deactivate the mode and take back control if your quad does not point towards you and starts making its way home.
  4. If everything goes well, your quad will come back towards you and start descending. Do not let it get too close to the ground or to yourself because the landing functionality is not included in current builds. Your quad may just crash near your or overshoot you.

You may have noticed that the quad had a hard time keeping a stable altitude. Sometimes this happens when the GPS altitude reading is unstable, so the controller is aiming for a moving target. If you had a very stable altitude reading and the quad still could not stabilize within ten meters of your desired target altitude, you may have to adjust the altitude throttle PID gains. These are the parameters:


We do not expect that most people will have to fine tune the navigation speed gains, but just in case the PID gains are:

gps_rescue_velocity_P = 80
gps_rescue_velocity_I = 10
gps_rescue_velocity_D = 20

After your quad reliably returns home once, you may want to test it at progressively larger distances and directions. When you have a reasonable level of trust in the feature, you may want to set your failsafe to GPS_RESCUE:

set failsafe_procedure = GPS-RESCUE

4 Replies to “GPS Rescue Mode for Betaflight – Setup Guide”

  1. This is awesome, I will try this tomorrow and update. Will this be update in the stable branch of betaflight when its ready?

  2. First of all, thank you for sharing your experience.
    Today I tested a drone with GPS RESCUE and the experience in general has been good.
    1- It works, it goes back home.
    2- The altitude control is quite unstable, it bounces a lot. I guess I have to adjust PID. Any recommendation?
    3- Eye, Danger, if you do not take the control, disarms alone above your head … with enough precision.

    We will continue experimenting, thanks.

  3. “in meters per second. I like 1500 (about 35 mph)”.

    Hey Diego, is that supposed to be read as centimeters per second? Would love my quad to be able to fly more than 4 times faster than the speed of sound, but we’re not there yet 🙂

    Keep up the good work! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *