GPS Rescue and Return-to-Home, step by step
Return-to-home is a state machine, not a magic button. Here is what each phase does, what it requires to work, and the ways it kills aircraft.
What it actually is
Return-to-home is not a button that brings your aircraft back. It is a state machine, and the reason most pilots cannot predict what their aircraft will do is that they have never been told what the states are.
Broadly, across Betaflight's GPS Rescue and the RTH modes in iNAV and ArduPilot, the phases go like this:
- Trigger and sanity check. Something fires the mode — a failsafe, a switch, a battery threshold. The firmware first asks whether it can even attempt this: is there a fix, is there a home point, is the aircraft far enough from home to bother? If the aircraft is very close to home, some firmware will simply land or hold rather than fly a rescue.
- Climb. The aircraft ascends to a configured return altitude. On most firmware this happens before it commits to the trip home, and there is a good reason for that which we will get to.
- Rotate and establish a course. The aircraft turns towards home. How it knows which way home is, and which way it is pointing, is the hard part of this whole feature.
- Cruise. It flies towards the home coordinate at a target speed, holding the return altitude, correcting course as the bearing updates.
- Arrive and descend. Near home, it slows, then descends on a controlled profile.
- Land, or hold. Depending on configuration it either continues to touchdown and disarms, or it stops at a low altitude and waits for you.
Every one of those phases has its own conditions and its own way of going wrong. When someone says "my RTH flew off in a random direction," what they usually mean is that phase 3 failed and phase 4 executed perfectly — in the wrong direction.
The three things it absolutely requires
A good GPS fix. Not "it says 3D fix." A fix with enough satellites, low enough dilution of precision, and stable — one that has been settled for a while, not one that appeared thirty seconds ago and is still wandering. A position that is drifting by ten metres is a home point that is wrong by ten metres.
A valid home point. This is the one that catches people. Home is captured when you arm. If you armed indoors, armed under a roof, armed in the car park before walking out to the field, or armed the instant the fix went green rather than after it settled — your home point is wherever the receiver thought it was at that moment. The aircraft will fly there, accurately and at speed.
Say it plainly: a return-to-home with a bad home point is not a rescue. It is a guided fly-away. The aircraft is doing exactly what you asked. You asked for the wrong place.
A heading source. The aircraft needs to know which way it is pointing to fly towards a bearing. This deserves its own section.
Heading: the part that bites
Consider what the firmware actually has. GPS gives it where it is. It does not give it which way the nose is facing. Those are different quantities, and a multirotor can fly in any direction regardless of where its nose points.
There are two ways to get heading, and both have teeth.
Derived from movement (course over ground). If the aircraft is moving, successive GPS positions give a direction of travel, and the firmware can reason about heading from that. This is how a rescue works on an aircraft with no compass — and it is why a rescue frequently begins by flying somewhere. The firmware needs motion before it can establish a course. If your aircraft is hovering nearly stationary when the rescue fires, it has no course to work from and must generate one. That initial movement is not a bug; it is the aircraft asking the world which way it is pointing. It also means a rescue that starts from a hover, in wind, at low speed, is starting from the worst possible information.
A magnetometer (compass). A compass gives you an absolute heading immediately, with no motion required. That is a genuine improvement — it is why iNAV and ArduPilot lean on one for serious navigation. But a compass measures a magnetic field, and a multirotor is a box full of current-carrying wires and magnets. Mount it next to the power leads, next to the ESCs, or under a battery, and the field it reads is your aircraft's, not the Earth's. Fail to calibrate it, or calibrate it badly, and it reports a heading with total confidence and no relationship to reality.
That is the trap. A bad compass is worse than no compass, because the firmware trusts it. A quad with no magnetometer flies a slightly clumsy rescue that gradually corrects. A quad with a compass reading 40° off flies a confident, committed, wrong course, and it will keep correcting itself back onto that wrong course as it goes.
Neither approach is "fine." Pick one deliberately, and if you pick the compass, mount it away from power wiring, calibrate it properly, and check it — point the aircraft at a known direction and see whether the heading agrees.
Altitude
The climb happens first because the aircraft cannot see the tree between it and home. There is no path planning here, no obstacle sensing, no terrain database. The aircraft holds an altitude and flies a straight line. If something solid is on that line, it flies into it.
So your return altitude has to clear everything on the path, not everything at your feet. That includes the treeline you launched from behind, the building at the edge of the field, the hillside between you and the aircraft, and the fact that "altitude" here is measured relative to the launch point — if you launched from a valley floor, an altitude that looks generous can still be below the ridge.
Set it high. Higher than feels necessary. The cost of a return altitude that is 30 m too high is a slightly longer trip and a bit more battery. The cost of one that is 5 m too low is the aircraft.
The descent should be conservative for the mirror-image reason: a fast descent onto a spot you cannot see is a fast descent onto whatever is there. Most firmware descends on a profile that slows as it nears the ground; do not tune that into a plummet because you are impatient.
Most RTH failures do not end in a mystery. They end in a tree or a building that the aircraft flew straight through at return altitude.
Betaflight GPS Rescue vs iNAV/ArduPilot RTH
Be honest about this, in both directions.
Betaflight's GPS Rescue is a last-ditch recovery feature bolted onto a firmware whose entire purpose is manual flight. Betaflight does not carry a full navigation stack. It does not have the state estimation that proper autonomous navigation is built on. GPS Rescue exists so that when you lose video or link over a field, there is some chance of getting the aircraft back rather than none. Treat it as an emergency measure with a decent success rate, not as navigation. Do not plan a flight around it working.
iNAV and ArduPilot treat RTH as a first-class navigation feature. They have proper state estimation, they fuse GPS with the other sensors, they expect a compass, and RTH sits inside a whole navigation system alongside position hold, waypoints and altitude control. It is more capable and, set up correctly, considerably more trustworthy.
That does not make it magic. An ArduPilot RTH with a bad home point and a misaligned compass fails in exactly the same way as a Betaflight one — it just fails with better telemetry. The firmware raises the ceiling. It does not remove the three requirements above.
How to set it up without losing the aircraft
- Get a real fix, and wait. Power up, go and do something else. Let the receiver settle. Do not arm at the first green light.
- Confirm the home point before arming. Arm outside, in the open, where you actually want home to be. After arming, check that the OSD's distance-to-home reads roughly zero and the direction indicator points sensibly. If your OSD does not show distance to home, add it — it is the single most useful field on the screen for this feature.
- Set a return altitude that clears the terrain and everything on it. Do this per-field if the fields differ.
- Test deliberately, in a large open space, with altitude in hand. Fly out a few hundred metres, well above anything, and trigger the rescue on purpose.
- Fly with your finger on the switch. You are testing a mode, not surrendering to it. Be ready to flick back to your normal mode the instant it does something you did not expect.
- Be ready to disarm. If it is heading somewhere it must not go, and you cannot take control back, disarming a falling aircraft is often the cheaper outcome. Decide that in advance, not in the moment.
The failure modes
- Bad home point. Armed indoors, armed too early, armed at the car. The aircraft returns precisely to the wrong coordinate.
- Poor or degrading fix. Rescue triggered while the position solution is unreliable. The aircraft chases a position that is itself wandering.
- Compass interference. A confidently wrong heading sends it on a confidently wrong course, and it holds that course.
- Return altitude below the treeline. Straight line, no obstacle sensing, into the trees.
- Battery. A rescue from a long way out, into wind, at climb power, on a pack that was already nearly done. It gets most of the way home and then lands wherever it happens to be.
- It arrives, and descends onto you. Home is where you armed, which may be exactly where you are standing, or where the pilots and spectators now are. A 5 kg aircraft descending on a home point in the middle of a group of people is a rescue that succeeded and an outcome that did not. Think about where home actually is, and stand somewhere else.
Testing it
Test it in a simulator, or in a very large empty field, deliberately, with altitude and an escape plan.
The one thing you must not do is test it for the first time on the day it is actually needed — because on that day you will have no video, no link, an aircraft somewhere you cannot see, and no way to intervene. That is not a test. That is a hope.
Run the real firmware against a simulator and you can trigger the rescue a hundred times: with a bad home point, with no compass, with a compass 40° out, from a hover, from full speed, into wind, on a flat battery. Watch each phase in turn. Learn what a rescue looks like when it is going right, so you recognise instantly when it is going wrong. Then fit it to an airframe.