Drone reporting negative altitude

I am currently setting up a F450 frame, first time build, to support autonomous missions. I launch and run my missions out of VS Code using python and connect through telemetry. I use Mission Planner for configuration and tuning, but I also use it for troubleshooting.

I have noticed that my drone tends to read a negative altitude. This isn’t a little negative either, I will barely pick up the drone by hand and it will read -1, -3, -4, -5, -10, -15, -25. At first I thought the vibrations were screwing with it so I resolved that issue. I am doing all of my testing without propellers on. Right now inside my house the program works fine. I tried to get my data flash logs via Mavlink but I kept getting a timeout error.

Here is a tlog from yesterday that shows the altitude at the end of the run.

link to all logs available, not necessary to go through.

I have had this error in three locations. Right now at my house it is working in my visual code, correct altitude but throws that error sometimes. At school and at the park it shows the negative altitude. At school I had a lot of compass, mag and other errors as well. At first I thought it was the buildings, but I moved out into a field and had the same errors.

I am just wanting to know what some possible issues may be, some resolves, how I can get back on track to not having to worry about my drone shooting 25 meters in the air to offset the difference and then turn off at that height because it thinks it hit zero. I am on a limited time frame with this project and I would rather not swap to a different flight controller. Yesterday I did a complete reinstall, default params and new calibrations.

I setup my drone using this guide https://docs.emlid.com/navio2/ and I found out how to set things like not having to use an RC controller through community forums.

Current parameter list

Software:

Mission Planner 1.3.7
Arducopter 3.6.11

Hardware:

Raspberry Pi 3 B+
Navio2
Readytosky 3DR Radio 915Mhz Telemetry kit
Goldbat 3000mAh Lipo 30C
EMAX 2213-935kv
30A ESCs
1045 Props, currently not on frame

Hi @Therkc,

It seems like we’ve been in touch about this over the email. Let me sum up the ideas for the setup upgrade.

We’ve discovered that in the initial setup the barometer wasn’t covered with foam. In the hardware setup guide, we usually suggest covering it as the barometer (steel cap IC) is sensitive to UV light and might report sudden jumps in altitude under sunlight. As far as I understand, this helped improve the general stability of the flight.

Also, it seems like the GNSS antenna was not placed on the ground plane. A ground plane is a conductive plate: it may be a piece of metal, a roof of a car, a metal roof of a building, etc. It reduces multipath, provides shielding and improves signal reception. This might be crucial for establishing a stable position. Have you had an opportunity to add it to your setup?

It’d be great to hear about your results on whether it was possible to exclude the negative altitude or the loss in altitude. Please keep us informed on your progress.

The antenna has always been mounted to a metal plate on the drone, I cannot mount it to a stationary object such as a car or a metal roof building because it would then no longer be on the drone itself and therefore would defeat the purpose. I looked at the data spec sheet for the NEO-M8 and it comes with a horizontal positional accuracy of +/- 2.5 meters, so the GPS “float” is just always going to be there. I found a work around for the Navio2 not being able to use the RTL function as well as not having an accuracy in centimeters, only meter level.

As far as the barometer goes, the open cell foam helped, but it still had issues. I covered the foam with foil to reflect the UV 100% and that seemed to help even more. We continued to have issues during flight so we made a makeshift enclosure to alleviate these problems even more and it seemed to help. This led to 3D printing a complete enclosure for the flight controller while leaving the foam on it. Right now that is as accurate as it is going to get, but I wasn’t expecting that level of variation out of the box, or going to those lengths to get it to perform accurately. I would upload the STL file of my flight controller cover to assist others who have similar problems, but the website does not support this.

Therk have you tried calibrating your Barometer prior to arming it? Try using qground control. In the sensors page there is a button called calibrate pressure. Try that.

Also, are you using both the GPS and the Barometer to read your height. Try using the GPS and Barometer separately and see if that gives you some sort of indication

I calibrated everything in Mission Planner, but I will download and checkout qgroundcontrol. It looks like a better software from the picture you posted, thanks. My drone works as expected already, I have already solved this issue and the thread needs to be locked at this point.

How did you resolve the issue, just by enclosing it or did you do anything else? Also have you performed an Autonune?

Covering the barometer with an excessive amount of foam and foil to reflect UV helped a bit, I ended up 3D printing a flight control cover to encapsulate the Navio2/Pi combination as well and that did the trick for the most part. The board is only accurate at a meter level according to Emlid anyways. As far as the GPS float, well the GPS sensor has a horizontal positional accuracy of +/- 2.5 meters so that will always stay inconsistent.

I had covered the board with a small piece of open celled foam, but on a 75 degree F day in Texas the altitude was still going nuts so I had to use excessive measures to further protect and encapsulate the board itself. I have a picture of the cover, it is upside down because it is easier to 3D print that way. It is not completely enclosed, air can flow underneath and it has an airflow slit. The back is also pretty open to access the header pins as well. I made it this way so i could mount a camera on the front as well.

https://www.thingiverse.com/thing:3082337

https://www.thingiverse.com/thing:1659565

2 Likes

Hi @Therkc,

Thank you for explaining how you solved the altitude issues! It’s good to know the drone works as expected now.

Just wanted to mention that if there’s a need for a more accurate position, you can check out our UAV RTK Kits with Reach M+ or Reach M2. They’ll allow you to achieve the centimeter-level accuracy while working in RTK.

If you have any questions or face any issues, don’t hesitate to reach out.