Long range wing: tuning GPS rescue for mountain terrain
GPS rescue in INAV works well in flat terrain. In a valley surrounded by 2000m ridges, the defaults will get you killed — or at least get you a long walk.
The problem: default RTH altitude is set as a fixed AGL value (say, 70m). If you’re 1.5km downvalley and the terrain rises 300m between you and home, 70m clearance launches the rescue climb at home-point altitude, not terrain altitude. The wing will fly directly into the hillside at cruise throttle.
What I changed:
Use relative altitude RTH, not absolute. Set the RTH altitude to be relative to launch point, not sea level. Then set it high enough to clear the worst-case terrain between any point in the flight area and home.
# INAV Configurator — RTH settings
rth_altitude: 180 # meters above launch point
rth_altitude_mode: EXTRA # EXTRA = adds rth_altitude on top of current altitude if already higher
rth_climb_first: ON # climb before turning — critical
rth_climb_first: ON is the most important setting. The wing climbs to RTH altitude at the launch point’s position before it starts navigating home. Without it, the turn happens at current position, current altitude — which may be below the ridge line.
Test it deliberately. I triggered GPS rescue intentionally at 800m range, 80m AGL, with a clear view of the aircraft. Let it run all the way home. First test showed it climbing too slowly and flying past the ridge before gaining enough altitude — adjusted throttle percentage up from 55% to 68%.
The rescue has now triggered once in a real scenario (TX battery died mid-flight, forgot to charge it). The wing came home clean. Those two hours of deliberate testing were worth it.