WP_NAVALT_MIN Clarification

WP_NAVALT_MIN reads as follows (on 4.7.0 dev, latest at time of post, and all other versions that I can find here):

This is the altitude in meters above which for navigation can begin. This applies in auto takeoff and auto landing.

All altitudes on Arducopter are calculated from takeoff. What happens if you take off on top of a hill and fly down-- what behavior develops when WP_NAVALT_MIN relative to takeoff is crossed? What happens if the landing zone’s ground is lower than the takeoff zone’s?

Might be a silly question, but an edge-case that I can’t find answers to.

I’ve just been playing with this in the simulator to justify what I thought was going to be my answer. And I didn’t get to the answer I expected. In fact, I couldn’t get WP_NAVALT_MIN to do anything in the sim. I tried relative and terrain based altitudes and the location I’m using has about a 100m difference between take off and landing. (using your example of taking off from the high ground)

The only thing that popped into my head was maybe this is tied to rangerfinder data, not terrain database data.

I’m going to tinker more with this but hopefully somebody smarter than me jumps in.

I assumed WP_NAVALT_MIN was only relevant during takeoff. It’s meant to stop the copter from moving laterally during takeoff, snagging the landing gear in the ground and tipping over, or heading straight for the pilots head - if you are arming in Auto mode.
If you set the value too high the copter will start drifting with wind before navigation starts.

Ideally we would all set a waypoint above the launch point.

I’ll test it out and check the code.

EDIT
In the code WP_NAVALT_MIN sets the target takeoff altitude when you arm in Auto mode or Guided mode (and a whole lot of other conditions have been met). The sub-mode is takeoff at that point, and once the takeoff has completed and met it’s target the sub-mode is changed to the next appropriate mode (such as Loiter or Guided). I cant see where WP_NAVALT_MIN is used again.
After that the sub-mode is generally Loiter unless you start doing other funky things in your mission.
Specifically, WP_NAVALT_MIN is not found in any of the normal flight modes including Land and RTL
So just going below the takeoff altitude or launch site should have no effect at all with regards to WP_NAVALT_MIN affecting navigation.

2 Likes

Beautiful! Could the publicly available documentation be amended to appropriately relay this information?