RelHomeAlt set to large negative value after second arm

Hello,

I am encountering at strange issue with my quadcopter/Navio2.

When armed the first time, the copter flies fine and all sensor values are sensible. But after landing and arming again, the relative to home altitude is set to a large negative value ( - 20-30m). This means that in second takeoff the copter will fly up very far when in reality the takeoff alt is set to only 2 meters.


As can bee seen in the graph, gps, baro and estimated altitude are all consistent but the relhome alt suddenly drops. I am using Navio2 with rpi 3B+, latest emlid raspbian image, arducopter 3.6. External GPS+compass from 3DR. Barometer is covered with foam.

Any parameter settings? Are there any MAVRos command or similar to reset the home altitude before taking off?
Dataflash log:
log_39_2019-5-6-08-49-08.bin (1.2 MB)

After some more testing, I can conclude that this sometimes happens from the start as well, see below graph:


Again, the pos alt is sensible but relative alt is very negative since origin alt is much higher. Is there any parameter to force it to use current altitude instead of relative?

Another dataflash:
19-05-06_13-32-48.bin (254.9 KB)

It seems like this issue was cause since MAVRos sets altitude in WGS84 reference frame and Arducopter wants altitude in AMSL (~30 meter difference). In our code we did update the home position using the reported alt from MAVRos and removing this seemed to fix the issue.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.