How to Setup GPS Rescue Mode in Betaflight

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

  1. Flash your FC to Betaflight 3.5 or newer
  2. Tutorial: Setup a GPS module on your FC
  3. 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 and not used 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)

You can 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.

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

save

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.

Edit History

  • Oct 2018 – tutorial created
  • Aug 2020 – updated, GUI changes, CLI parameter names changes, added throttle min/max/hover values

63 thoughts on “How to Setup GPS Rescue Mode in Betaflight

  1. Glen Beech

    Hello,
    I believe I have my Gps rescue set up, it locks on to the satellite’s, but in BF the modes page….I don’t get the gps rescue tab turning yellow when I activate the switch, the marker goes into the yellow range on the slider but the GPS Rescue tab on the left does not turn yellow.I did test the switch in the air 150 meters away, and the quad tumbled from the sky and I lost video as soon as switch flipped? [email protected]

    Reply
  2. Jon

    Something else I found with beta flight. So instead on the Failsafe tab you can set the value of a switch so that it’s in the active mode. So setting RTH switch to 1800 will have it activate that if it comes within range but forgot to turn on the switch

    Reply
  3. Rob Bannister

    I tried setting set gps_rescue_min_sats = 0 in betaflight 4.2 and the entry is invalid. The lowest you can put seems to be 5

    Reply
    1. Oscar Post author

      if you want to take off without GPS fix, just do this in CLI:
      set gps_rescue_allow_arming_without_fix = ON

      Reply
  4. Franky

    Great information Oscar,
    I already set up rescue mode in betaflight and assign 1 switch on my TX for rescue mode,
    Should I set in failsafe in my transmitter as well?
    in my TX there is Failsafe mode = not set / hold / custom / no pulses, last time I use custom set (position to arm, level, rescue mode) but it disarm after failsafe 2 seconds, should I just set it to NO PULSE?

    Reply
    1. Oscar Post author

      Yes, although failsafe always gets triggered first in Betaflight and that’s all you need, just set it to No Pulse in your radio anyway.

      Reply
  5. Ed

    Hi Oscar,
    So I lost video, hit the switch for Rescue but wasn’t sure so hit throttle anyway, I fly in Acro always, and I did manage to get the quad back but noticed on the HD footage it was fighting my throttle inputs and possibly stick bumps. Curious if that somehow ruins the FC or it just keeps fighting my stick inputs and prolongs my return?

    Reply
  6. JEREMY HOLT

    Hey Oscar I installed RDQ mini 8 gps on kakute f7 and when I set a switch and checked in modes tab gps rescue doesnt highlight when switched on. I know in flight it has to be 100 meters away but when testing on the bench I think the mode should highlight like all other switched modes. Any idea what’s going on?

    Reply
  7. Ian morris

    Hi Oscar. I have set up gps rescue on my quad with the matek 405 std flight controller and all seems to be working well thanks to your great instructions. My only concern is, and bear in mind I have only tested this with the props off on a bench, I have assigned rescue mode to a spare switch on the radio, and when I flick it, sure enough, rescue shows on the goggles screen, my worry is that when I arm the quad on the bench near the window, if I then press the rescue mode switch, it cuts the quads motors, is this just because it hasn’t taken off and gone anywhere yet. Many thanks. Ian.

    Reply
    1. Oscar Post author

      you are too close, it has to be at least certain distance from the launch location (set in the CLI commands)

      Reply
  8. trex450

    hi oscar, thank you very mutch for the description. it works fine.
    for eachine x220hv @4s it is very important to change the default values form this parameter to:

    gps_rescue_throttle_hover = 1400
    gps_rescue_throttle_min = 1250

    otherwise the drone fly back in rescue-mode like a frog. the motor seams to stopp every second an then start again and so on. this because the default value (1280) is to low for hovering. also the …trotte_min ist too low. you have to determine this paramter for your own drone.

    Reply
  9. Bill

    Great write-up Oscar! Thank you. I set mine up but when it reached 100m from home it shut-off motors and crashed. :( Any suggestions?

    Reply
    1. Oscar Post author

      because you set distance to 100m? you should just take over control as soon as you have signal, it’s not designed to return to home like DJI drones.

      Reply
  10. Ditto

    Hi Oscar,

    Bravo !!! This blog is great,

    Pls Help I’m still confuse and had a question when GPS rescue set with the fail safe logic not using switch as per below,

    set failsafe_procedure = GPS-RESCUE

    save

    I know it will happen “automatically” during e.g rx loss…, and after the rx signal back to normal what will happen with fail safe procedure? can I control back my quad or let it land? under authority of failsafe?

    Reply
    1. Oscar Post author

      You will regain control as soon as signal is back. Please read the section “Using GPS_Rescue for Failsafe” again, it tells you how it works and how it should be setup.

      Reply
  11. Willy

    I ask you a question, does the GPS on the drone help stabilize it, kind of like dji that when they are with connected satellites are stuck in a place?

    Reply
  12. Willy Arredondo

    Te hago una consulta el gps en el dron lo ayuda a estabilizarlo, tipo casi como los dji que cuando estan con suficientes satelites conectados se quedan clavado en un lugar ?

    Reply
  13. David Downs

    Oscar question how would I have gps rescue on a switch and also have my Fail-Safe set to either work like normal no gps rescue and have gps rescue activate when wanted on the same switch? Just in case I have rx loss in a bad area I don’t want it to activate GPS rescue like a bando spot or low clearance area…so I wanna have the betaflight Fail-Safe to be setup with a switch but have two options for Fail-Safe on a switch and a sepy switch for gps rescue all by itself? Is this possible?

    Reply
  14. Aditya

    Hi Oscar,

    Many thanks for sharing this…. Test the GPS rescue with switch and works great.

    Pls advice which failsafe mode i should choose in TX? I am using Tarani Xlite with r9 lite module. Should i just put “no pulse” or make it “Custom” and than set to activate GPS Rescue switch.

    Thanks before

    Reply
    1. Oscar Post author

      it shouldn’t matter as long as you use SBUS or FPort, because it has a failsafe flag in the protocol to notify the FC, but setting it to no pulse is probably the safest.

      Reply
  15. Olivier Hacking

    This looks great, thanks for the report. I lost video above a river last weekend and almost lost the quad… Luckily video came back.
    However, I am running a full KISS (V1) setup. Is it possible to setup such a system on a KISS quad?

    Reply
    1. Oscar Post author

      Not unless KISS support GPS. You’d have to check with KISS customer service, I am not sure if this is possible.

      Reply
  16. Daniel

    Hello Oscar!

    How i need to set my failsave in crossfire, should i set it to cut, and in betaflight to gps rescue? is this ok? i use betaflight 4.0, and rth on a switch works perfect.

    Thanks for Help!

    Reply
  17. John S

    To add some feedback, in case it helps others: Adjust `gps_rescue_angle` with caution!

    The default GPS Rescue Mode variables tested correctly on my 7″ SuperG+ running Betaflight 3.5.7. I sometimes fly during moderate wind where 32 degrees of pitch is insufficient, so I increased `set gps_rescue_angle` from 32 to 40 degrees. During testing, however, gps_rescue_angle=40 consistently caused the quad to reach altitude, then descend towards 0 altitude as it headed towards home (well before reaching `gps_rescue_descent_distance`). The quad would have crashed into the ground had I not taken control. I tried 4S, 5S, and 6S batteries with the same results. Increasing `gps_rescue_throttle_max` from 1600 to 1800 did not help. This is odd, as the quad is well tuned and I have no problem maintaining altitude when flying at a 40+ degree pitch.

    All is well with gps_rescue_angle=32. Hopefully it’s not too windy when I need a rescue!

    Reply
  18. TDub

    @jerrod I have gps mode enabled. I know this because I can see my long and lat on my OSD. I can see how many gps satalights im locked into.

    But when I go into modes there is no rescue mode. It’s as if my version doesn’t support it but I’m using 3.5.6 and every guide says 3.5+.

    Reply
  19. Jerrod

    @Tdub – in your config tab you have to enable GPS mode. Almost exactly half way down the page, on the right column.

    @Oscar – I think you might have it backwards. My gps return to home works the other way – up arrow is toward home, down arrow means you’re traveling away from home.

    Thanks for the article Oscar!

    Reply
  20. TDub

    I’ve set up a GPS module via an open port. I have it communicating, I can see my GPS stats on my OSD but when I go into “modes” I do not have a “GPS Rescue” option. I have “Beep GPS Satellite Count” but no rescue mode. How do I enable that mode?

    Reply
  21. James Hatton

    Hi, I set my Cl Racing F4S board and HGLRC Neo-8M GPS up exactly the way you wrote. I made a simple flight
    in the front yard. The quad was only about 5 feet off the ground and flew out about 35 feet, stopped, turned around but all of a sudden it went full throttle and shot up only to either I killed the motors or the motors quit and it fell to the pavement nose first. (miraculously there was no damage except the ice that it hit) I have no idea what caused that to happen.
    Now when I got the quad in the air again I didn’t touch Rescue or anything and as the quad was hovering in front of me the motors suddenly quit and it fell to the ground. I was informed that maybe the quad is going into failsafe mode. The board is new as is the Rx, was a clean build and everything is working.
    I now understand that Rescue if activated closer than 100m will kill the motors but what happens if you are coming back on Rescue will it kill the motors when it comes within the 100m?

    https://www.youtube.com/watch?v=BWmHsctdpck&t=1s

    Thank you, your information is very valuable to us.
    Jim

    Reply
  22. Trevor Crouch

    Hi Oscar (or anyone else, that can help) Ive type in get gps in the cli and I dont have set gps_rescue_min_dth = 100. If I try to add it in it comes back with ###ERROR### Invalid name. Is there a clever way of adding this command into the B/F 3.5.1 thats on my G730L please? Im stumped :(

    Reply
    1. Oscar Post author

      This command is for the future version of Betaflight 4.0 (still in Beta).
      For current stable Betaflight 3.5.X, use this command instead:

      set gps_rescue_min_descent_dist = 100

      Reply
      1. Richard

        I have tried both commands and am getting the invalid name on both. I have betaflight 3.5.6 installed. Any other recommendations?

  23. Lee

    Hi Oscar, one question to ask ,
    If I set failsafe on my transmitter for quad to power down the motors and drop , and I was to set up gps RTH as failsafe also ,
    Question, what failsafe will the quad take orders from ?
    Will it drop or RTH?
    Thank you Oscar I’m learning a lot for your blog
    Very new to the hobby

    Reply
    1. Oscar Post author

      look at these as layers… TX, RX and FC, these are all layers.
      The closest layer to your motors is the FC, so the quad will react to the FC failsafe layer first.
      This is assuming you are using SBUS or CRSF, where the RX will send a “Failsafe flag” to the FC.

      Reply
  24. Brad Ivie

    Hello Oscar! I have a question and think may know now but want to MAKE SURE…For the first trial with the rescue mode has me puzzled but I think that may be clear now as well…. Okay first time I tried it, it seemed to start to work, it went straight up I guess the the altitude have set but then dropped from the sky?! Now I think that is prob due to I turned GPS Rescue back off then tried to turn it back on, and after reading your article that seems to make it drop??…I think? as well as I “may” have disarmed it and rearmed it to try to get the “failsafe” rescue to kick in and prob re-set the “home” location?! Alright I am about to try it again now after doing some adjusting, BUT MY BIG question is “Which way should the arrow point for home” down?? For if I remember correctly I did watch someones video on this after my failure, and I believe and PLEASE TELL ME, when arrow is pointing downward is that pointing to “home” for I just flew it and seems that was direction it was when I was some distance away, and in the video I watched I DID notice that when rescue is activated the arrow JUMPS STRAIGHT UP on it’s return, so I still am confused?!! So which way should the arrow be pointing when I have it away from me and should be pointing “home”?? PLEASE let me know for need to test it again, but I almost lost it the first time just got lucky finding it somewhat. Thanks I greatly appreciate it!

    Reply
    1. Oscar Post author

      If the arrow points up in OSD, means it’s flying away from home. If it points down, it means the quad is facing home.

      Reply
  25. gino

    please could you help I have put gps on my quad tested it in my garden with props off so got 8 sats come up when I flicked the switch the motors go very fast ,my question is why should it do this when it is not 100 m away ,should it have gone into failsafe and cut the motors ,I have set all the cli commands as you have and am running 3.5.1

    Reply
  26. Gordon

    Hi Oscar, would you know why I can get Rescue mode to work faultlessly when I activate it with a switch but when I try to activate it with failsafe either with Failsafe set to a switch or by turning off the transmitter it just disarms.

    Reply
    1. Oscar Post author

      Rescue mode only works when the quad is further than 100m away (or any distance you set), within this distance you quad will just drop/disarm.
      If this is not the case then you need to play with Insanity-Check’s options.

      Reply
  27. Tavis

    When testing GPS Rescue, make sure you land and disarm between tests. This is because the rescue altitude is set to the highest altitude you reach during flight or the minimum setting number (whichever is greater, ie. the quad will never descend when rescue is activated, it will only ascend or maintain altitude). If you do multiple rescue tests without disarming, then the minimum altitude can stack higher and higher depending on how high you are flying and each test the quad will climb a little bit higher due to the altitude error stacking.

    Reply
  28. Fei

    Thanks for explaination!
    What will drone doing when he returns to home, will it land automatically and disarm? For example if i have problems with radio.

    Reply
  29. Steve Matthews

    Does anyone know whether this is possible using a FRSky GPS module? I have a feeling it’s not, and that the FrSKy only connects to the FrSky receiver not directly to the flight controller.

    Reply
  30. Jacob Alao

    Hi Oscar. Thank you so so much for this information. I have a question based on the last section of your blog. If I set Gps rescue to failsafe and I experience failsafe and lose video at the same time. My quad starts heading back and it reconnects to my quad, but I am flying blind. U said set the switch to failsafe as well. How do I set both up, failsafe and switch if I can only chose one mode. Please advice. Thank you. I have learnt a lot.

    Reply
  31. Roger

    Good information Oscar. I installed mine a couple of weeks ago (mini ublox M8N) strictly for lost quad location. I went out to check it out but due to a FC malfunction my quad went wildly out of control before i had a chance to ‘test’ the install. Long story short, got my GPS coordinates from my DVR, plugged them into my smartphone and it got me within 50 feet of my quad. :) With out the GPS i probably would have been hours trying to find the quad.

    Reply
  32. Ashade

    I have experience the “drone falling out of the sky” issue. My question is: Why would sanity check make the quad behave properly when it doesn’t do that by arming through a switch. Have you test that? I have sanity check off because of this reason as of right now.

    Reply
    1. Oscar Post author

      it’s really a hit and miss issue at the moment with Sanity Check. Make sure you understand the risk of turning it off. Sometimes it’s better to lose your quad than damaging something or someone more important.

      Reply
  33. Eli

    Hi Oscar ! there’s one important detail in:
    set gps_rescue_initial_alt = 50

    where 50 is Alt in meters. this value means Absolute alt or above takeoff ?
    because in my place Absolute hight ( ground level ) is about 180 meters so if I write 50 meters my drone becomes a suicide machine )))

    Reply
  34. WP

    Hi Oscar,

    non-failsafe scenario question:
    is it possible to take back the control if the mode was activated previously w. a switch?

    If I turn the mode off w. the switch within the minimum range (before the quad “lands”) it falls from the sky.

    BF3.4

    thanks,
    WP

    Reply
    1. Oscar Post author

      Yea if it was activated with a switch, you can put it back in acro mode anytime using that switch. What’s your Sanity setting?

      Reply
  35. Pablo

    Thanks for this post! My next build will probably be a 6inch for mid/long range with gps, so this tutorial it’s perfect

    Reply
  36. Mad Monkey FPV

    When I first tested this (less than descent distance) it just disarmed in flight.Does any modification beed to be made to the sanity checks tonprevent this?

    Reply
    1. Oscar Post author

      You can try
      set gps_rescue_sanity_checks = RESCUE_SANITY_FS_ONLY
      or even OFF, but that’s not recommended according to the wiki.

      Reply
    2. Dave

      You need to be beyond the minimum range of 100m, maybe its set as part of descent distance, not sure on that. The disarm I believe is a safety measure so the drone doesn’t fly autopilot straight into you being so close to its home coordinates. Personally I would like to see a safety check added that if it is activated by switch within the 100m range, it simply does nothing but beeps an alarm onscreen “proximity” or something instead of dropping out of the sky.

      Reply

Leave a Reply

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

For prompt technical support, please use our forum IntoFPV.com. I check blog comments weekly.