You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/source/docs/common-terrain-following.rst
+49-9Lines changed: 49 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,11 +69,12 @@ Terrain Following in CRUISE and FBWB modes can be disabled with an RC switch ass
69
69
Use of terrain following in AUTO missions is controlled on a waypoint by
70
70
waypoint basis using the reference frame of the waypoint. Normal (non
71
71
terrain following) waypoints have a "Relative" reference frame, and
72
-
altitudes are specified relative to the home location. Not by the :ref:`TERRAIN_FOLLOW<TERRAIN_FOLLOW>` parameter. Terrain following
73
-
waypoints have a "Terrain" reference frame, and altitudes are relative
72
+
altitudes are specified relative to the home location, not by the :ref:`TERRAIN_FOLLOW<TERRAIN_FOLLOW>` parameter.
73
+
Terrain following waypoints have a "Terrain" reference frame, and altitudes are relative
74
74
to the ground level given in the terrain database.
75
75
76
-
.. note:: in AUTO mode autolandings, the :ref:`TERRAIN_FOLLOW<TERRAIN_FOLLOW>` parameter does have an impact, when a rangefinder is also used. See :ref:`rangefinder-autolanding`.
76
+
.. note:: in AUTO mode autolandings, the :ref:`TERRAIN_FOLLOW<TERRAIN_FOLLOW>` parameter
77
+
does have an impact, when a rangefinder is also used. See :ref:`rangefinder-autolanding`.
77
78
78
79
See :ref:`common-understanding-altitude` for altitude definitions.
79
80
@@ -92,30 +93,48 @@ the terrain may vary significantly. Key uses are:
92
93
- **FPV flying.** When flying FPV in CRUISE mode it is useful to
93
94
maintain constant height above the ground so you can spend more time
94
95
enjoying the scenary and less time avoiding hills
96
+
- **Regulatory Compliance.** many countries have restrictions on the
97
+
altitude drones must fly at or below, often 400' (about 120m). with
98
+
terrain following enabled, missions items and other limits including
99
+
:ref:`FENCE_ALT_MIN<FENCE_ALT_MIN>` and :ref:`FENCE_ALT_MAX<FENCE_ALT_MAX>`
100
+
can be specified in AGL (terrain) frame.
95
101
96
102
97
103
Sources of Terrain Data
98
104
=======================
99
105
100
106
The ground station is normally responsible for providing the raw terrain data which is sent to the aircraft via MAVLink. Right now only Mission Planner and MAVProxy support the required TERRAIN_DATA and TERRAIN_REQUEST MAVLink messages needed for terrain following download support. If you are using a different ground station , in order to download terrain data you will need to connect using one of those two ground stations in order to allow ArduPilot to load terrain data onto your board on the ground or in flight. Once it is loaded, it is saved permanently on the microSD card.
101
107
102
-
Both MissionPlanner and MAVProxy support the global SRTM database for terrain data. The ArduPilot SRTM server used by MAVProxy and Mission Planner has 100m grid spacing. Unless the ground control station uses a different server with closer spacing, setting the :ref:`TERRAIN_SPACING <TERRAIN_SPACING>` parameter lower than 100m provides no better resolution, and only consumes more space on the SD card.
108
+
Both MissionPlanner and MAVProxy support the global SRTM database for terrain data.
109
+
The ArduPilot SRTM server used by MAVProxy and Mission Planner provides data with 100m and 30m grid spacing.
110
+
Unless the ground control station uses a different server, setting the :ref:`TERRAIN_SPACING <TERRAIN_SPACING>`
111
+
parameter other than 100m or 30m provides no better resolution, and only consumes more space on the SD card.
103
112
104
-
Terrain Data is downloaded any time you save or connect with a loaded mission with these ground stations, or, if flying, the autopilot will request data if it's flying into an area not already downloaded, assuming the ground station can provide it. Usually an internet connection is required by the ground station.
113
+
Terrain Data is downloaded any time you save or connect with a loaded mission with these ground stations, or,
114
+
if flying, the autopilot will request data if it's flying into an area not already downloaded, assuming the
115
+
ground station can provide it. Usually an internet connection is required by the ground station.
105
116
106
117
.. warning:: While the autopilot will request the terrain data around waypoints and home location, if it is not connected to a GCS that can supply enroute tiles, the autopilot just interpolates between waypoint's terrain elevation. See below:
107
118
.. image:: ../../../images/terrain-warning.jpg
108
119
109
-
If you are not flying with a GCS that can fetch and supply terrain data as the vehicles flies between waypoints, the you may need to load terrain data covering the flight route and/or area for RTL paths manually.
120
+
If you are not flying with a GCS that can fetch and supply terrain data as the vehicles flies between waypoints,
121
+
the you may need to load terrain data covering the flight route and/or area for RTL paths manually.
110
122
111
-
You can download a set of terrain data tiles for any anticipated flight area using this `web utility <https://terrain.ardupilot.org/>`__.
123
+
You can download a set of terrain data tiles at either 100m (STRM3) or 30m (SRTM1) for any anticipated
124
+
flight area using this `web utility <https://terrain.ardupilot.org/>`__.
It will create tiles for the specified radius around a geographic location. Then you can download them, unzip and write in the APM/TERRAIN folder of the SD card.
116
129
117
130
You can also download .zip files for entire continents, or individual tiles from `here <https://terrain.ardupilot.org/continentsdat3/>`__.
118
131
132
+
You may also want to obtain higher resolution data, available from commercial sources online, if you have specialized requirements.
133
+
134
+
It's a very good idea to remove the SD card from the AutoPilot and copy large terrain data sets directly to
135
+
the /APM/TERRAIN folder from your PC, as copying them via MAVFtp in Mission Planner using a USB
136
+
or other MAVlink connection is likely to take many, many hours or even days.
137
+
119
138
Terrain Spacing
120
139
===============
121
140
@@ -128,7 +147,17 @@ grid spacing for specialist applications.
128
147
Note that the amount of terrain data kept in memory is directly related
129
148
to the grid spacing. If you decrease the ``TERRAIN_SPACING`` by a factor of
130
149
2 then the amount of terrain area kept in memory is reduced by a factor
131
-
of 4. It is recommended that you use a ``TERRAIN_SPACING`` of 100
150
+
of 4. This may be an issue on older boards with less memory, but for a newer
151
+
AutoPilot with 1M of RAM, the :ref:`TERRAIN_CACHE_SZ<TERRAIN_CACHE_SZ>` can be
152
+
increased to make better use of available memory for caching terrain tiles. The default
153
+
is 12 but a good value on an H743 or H757 processor is probably 60.
154
+
155
+
30m spacing (SRTM1) data provides a good compromise between accuracy and
156
+
bandwidth/storage space and runtime memory requirements. Use ``TERRAIN_SPACING`` = 30
157
+
meters for most normal use cases.
158
+
159
+
If your AutoPilot has less memory, less storage space or communication
160
+
bandwidth might be an issue, it is recommended that you use a ``TERRAIN_SPACING`` of 100
132
161
meters to prevent the aircraft running off the side of a grid in flight
133
162
and not having data available.
134
163
@@ -163,7 +192,7 @@ steps
163
192
When the autopilot has finished loading terrain data you should see
164
193
"ter_pend" goes to zero and the current terrain altitude in meters
165
194
showing up in "ter_alt". The "ter_pend" value is the number of terrain
166
-
blocks that the autopilot is waiting to load from the ground station.
195
+
blocks that the autopilot is waiting to load from the ground station or from the SD Card.
167
196
168
197
Options
169
198
-------
@@ -185,5 +214,16 @@ include climb rates your aircraft cannot achieve.
185
214
The climb rate used in the terrain look-ahead is based on the
186
215
:ref:`TECS_CLMB_MAX<TECS_CLMB_MAX>` parameter, combined with your current ground speed.
187
216
217
+
Recommended Settings
218
+
====================
219
+
220
+
- set :ref:`TERRAIN_ENABLE<TERRAIN_ENABLE>` to 1 and :ref:`TERRAIN_FOLLOW<TERRAIN_FOLLOW>` to 1
221
+
- set :ref:`TERRAIN_SPACING<TERRAIN_SPACING>` to 30 meters for more precise AGL calculations
222
+
- set :ref:`TERRAIN_CACHE_SZ<TERRAIN_CACHE_SZ>` to 60 to load more tiles into memory (RAM)
223
+
- set :ref:`TERRAIN_LOOKAHD<TERRAIN_LOOKAHD>` to 1000 meters unless you have a reason to need more
224
+
225
+
To avoid high bandwidth consumption due to terrain tiles being sent to the aircraft over your telemetry
226
+
link, especially if you often fly in different locations, it's also highly recommended to download the
227
+
terrain around your planned flight area in the /APM/TERRAIN folder on the SD Card on the AutoPilot.
0 commit comments