I'm unclear on how sonar and LIDAR are used for reference altitude readings as opposed to barometer-based altitude readings. I assume that sonar or LIDAR (when available) are used for altitude references below a certain altitude as determined from the barometer referenced from the ground at arming time (e.g. below 20 feet? Can this value be changed?) But what happens when sonar or LIDAR are in use in a situation with an intermediate obstacle?
For example, assume you start at point A, rise to 15 feet altitude (with sonar or LIDAR enabled), and then head toward point B, also at 15 feet altitude referenced from the ground at arming time at point A.
However, between A and B is a structure 10 feet tall. When the quad reaches the structure (again, still assuming sonar or LIDAR in use), will it rise up 15 feet above the structure, with the top of the structure being the new "ground" reference point, or will the quad fly level at 15 feet as referenced from the actual ground (so, 5 feet above the structure)? If the former behavior is the default, can the latter behavior be specified? Thanks!
You need to be a member of diydrones to add comments!
Replies
I have a similar question.
During the attached flight, the copter suddenly landed during alt hold mode. It's not exactly visible on the graph, but I landed the copter manually and only then switched to stabilise mode at the end. You can see SAlt does not go back to 0.
Could it be that it is still taking into account the barometer?
Graph__2015-10-27_19-15-29_2_bin2.png
logfile.log
it will ignore the internal baro and rely upon either the sonar or lidar when your within the working range distance. In short the craft will track the ground at the same "height directly below the sensor" irregardless of the barometric altitude reading. Hopefully that answers your question.
Thanks. What is the "working range distance" default? Can it be user-adjusted via parameters or is it compiled in? If it's height directly below the sensor that matters, what is an appropriate strategy to maintain a *level* flight at a specified altitude referenced from the ground, when passing over lower, variable-height intermediate obstacles? Thanks again.
Read the wiki might help find your answers:
Sonar Maximum Altitude
As for the LIDAR, you have the following parameters to configure:
RNGFND_MAX_CM : max altitude
RNGFND_MIN_CM : min altitude
Thanks. I had looked through the Wiki as usual, but missed this. Perhaps I was looking at an older version, there seem to be several floating around. This still doesn't really address the "level flight" issue though as far as I can tell. Essentially, I'd like to be able to use LIDAR to maintain precision level flight even when passing over lower obstacles, which would of course imply a calculation representing the difference between the original ground and the height of those intermediate obstacles.