As the tittle, in particular application such as crop spraying, we just want the copter above the field at about 1.5m to 5m. As I observed at 0m - 15m, the altitude (real altitude) is always different from the estimated altitude of the drone (https://ardupilot.org/copter/docs/common-understanding-altitude.html). It is hard to say how different but if we want the copter to maintain at 2m (in the flight plan) and it reports 5m or something, so it is significant!
I also have attached the downward rangefinder (a radar module translating to DISTANCE_SENSOR via MAVLink message). However it seems to be to make the copter more stable at altitude holding rather than reaching the target altitude that I expect. I am thinking about using the rangefinder for replacing the role of Barometers, but it is not recommended!
To summarize, is there any promising solutions for maintaining the constant elevation during flight (in Auto mode, max speed is 5m/s, minimum height is 1.5m), not including other factors yet.
Thanks in advance.
There is a PR that got merged in the master branch to fix this issue. I backported it to the stable branch and been flying it. So far it works well.
Are you willing to test the master branch?
I am willing to try but not sure what to do next. Are you talking about cloning the master branch (here https://github.com/ArduPilot/ardupilot), build and upgrade to my drone?
I am not so familiar to this but willing to do it for solving my problem
I think there are nightly builds available in mission planner. But I am not sure. As a developer I compile it myself
Please be warned that master branch is not declared as stable, and you must be willing to take some risks.
I use the DISTANCE_SENSOR message, published from a Nvidia TX2, calculated using a vision algorithm from a camera, and it works great!!! So IMHO the risk is worth it. But you need to decide it for yourself.
I did the same, sending DISTANE_SENSOR from my JetsonNano/RPi. I am using the Cube Orange so it would be nice that you could share the binary file for saving time. It is okay if not. I will test with S450 frame first.
Thanks in advance.