TERRAIN_ parameters¶
6 parameters in the TERRAIN_ family. ArduCopter 4.7 only — other vehicles share many of these names but not always the same ranges or meanings.
TERRAIN_CACHE_SZ¶
Terrain cache size
The number of 32x28 cache blocks to keep in memory. Each block uses about 1800 bytes of memory
Range |
|
User level |
Advanced |
TERRAIN_ENABLE¶
Terrain data enable
enable terrain data. This enables the vehicle storing a database of terrain data on the SD card. The terrain data is requested from the ground station as needed, and stored for later use on the SD card. To be useful the ground station must support TERRAIN_REQUEST messages and have access to a terrain database, such as the SRTM database.
User level |
Advanced |
Values¶
Value |
Meaning |
|---|---|
|
Disable |
|
Enable |
TERRAIN_MARGIN¶
Acceptance margin
Margin in centi-meters to accept terrain data from the GCS. This can be used to allow older terrain data generated with less accurate latitude/longitude scaling to be used
Units |
|
Range |
|
User level |
Advanced |
TERRAIN_OFS_MAX¶
Terrain reference offset maximum
The maximum adjustment of terrain altitude based on the assumption that the vehicle is on the ground when it is armed. When the vehicle is armed the location of the vehicle is recorded, and when terrain data is available for that location a height adjustment for terrain data is calculated that aligns the terrain height at that location with the altitude recorded at arming. This height adjustment is applied to all terrain data. This parameter clamps the amount of adjustment. A value of zero disables the use of terrain height adjustment.
Units |
|
Range |
|
User level |
Advanced |
TERRAIN_OPTIONS¶
Terrain options
Options to change behavior of terrain system. The Accept Old Terrain Data option can be used to accept terrain data generated from before the terrain database bugs were fixed. The bugs in the data were all fixed from 24th February 2026. If you really want to risk using the old terrain data then you can set this option, otherwise remove the old terrain data by formatting your microSD card or renaming the /APM/TERRAIN folder. Then downloaded updated data from https://terrain.ardupilot.org, or let the automatic terrain download repopulate your terrain data.
User level |
Advanced |
Bitmask¶
Value |
Meaning |
|---|---|
|
Disable Download |
|
Disable Disk |
|
Accept Old Terrain Data |
TERRAIN_SPACING¶
Terrain grid spacing
Distance between terrain grid points in meters. This controls the horizontal resolution of the terrain data that is stored on te SD card and requested from the ground station. If your GCS is using the ArduPilot SRTM database like Mission Planner or MAVProxy, then a resolution of 100 meters is appropriate. Grid spacings lower than 100 meters waste SD card space if the GCS cannot provide that resolution. The grid spacing also controls how much data is kept in memory during flight. A larger grid spacing will allow for a larger amount of data in memory. A grid spacing of 100 meters results in the vehicle keeping 12 grid squares in memory with each grid square having a size of 2.7 kilometers by 3.2 kilometers. Any additional grid squares are stored on the SD once they are fetched from the GCS and will be loaded as needed.
Units |
|
Increment |
|
User level |
Advanced |