Q_wp_ter_margin

Hello,

I don’t understand the wiki description:
“Waypoint Terrain following altitude margin. Vehicle will stop if distance from target altitude is larger than this margin (in meters)”

What does mean vehicle stop ?

I join the question.
What does it all mean?:thinking:

( WPNAV_TER_MARGIN = 10) Rangefinder will stop working after or before 10m altitude (default). Or what does “stop” mean?
Can you explain clearly?

I have done some digging into the code (Copter, actually).

Basically, the “terrain margin” is used to stop the UAV from moving in XY-plane when the difference in Z-axis is greater than the WP_TER_MARGIN (and possibly the Q_WP_TER_MARGIN). This gives some time for the PSC_Z to climb the UAV to be within the margin.

I hope this helps!