The terrain data and the aircraft disagree about the height of the take-off spot
What ArduPilot says:
- Terrain: clamping offset N.N to N.N
At arming ArduPilot compares its own altitude above sea level with the terrain database's height for the same spot, and shifts all terrain heights by the difference so that the ground under the aircraft reads zero. The shift is limited to TERRAIN_OFS_MAX (30 m by default). This line says the difference (the first number, in metres) was larger than the limit and only the limit (the second number) was applied: from now on “height above terrain” is wrong by the remainder.
What to do, most likely first
The aircraft's altitude above sea level was wrong at arming: GPS height can be tens of metres off soon after power-on.
CheckCompare the altitude above sea level shown by the ground station with the real elevation of the field from a map.
FixGive the GPS a few minutes after power-on before arming; rebooting on the spot once the fix is good sets the altitude afresh.
The aircraft is not standing on the ground the database knows: a rooftop, a tower, or a steep slope that the grid smooths out.
FixTake off from the ground where you can. Otherwise plan terrain-following legs with clearance to cover the remainder the message shows.
The terrain data for this place is wrong or out of date.
CheckThe same difference appears at this place on every flight, with a good GPS fix.
FixDelete the APM/TERRAIN folder on the SD card and let the ground station send the data again.
Do not answer this by raising TERRAIN_OFS_MAX: a larger limit lets a bad altitude at arming move every terrain height by more.
Parameters to look at
| Parameter | What it is |
|---|---|
TERRAIN_OFS_MAX | Terrain reference offset maximum |
TERRAIN_SPACING | Terrain grid spacing |
Where to do it:Failsafe Explainer
The code that sends it
Terrain: clamping offset N.N to N.N
libraries/AP_Terrain/AP_Terrain.cpp AP_Terrain::update_reference_offset() · Open in ArduPilot Copter-4.7.1