GPS altitude depends on drone tilt

Hi,

We are using an RTK GPS for positioning, and generally get very good accuracy with it.

But when tilting the drone, it impacts the altitude in POS->Alt (and thereby the altitude sent on MavLink on GPS_Int_Data). The actual raw GPS altitude is correct, only the filtered one has the error.

Our GPS is mounted at the end of one of the arms, and we have set the correct offset in the GPS_POS parameters.

Here is a plot of the problem, where the drone is held one meter over the ground, and tilted around the axis of the arm that has the GPS antenna on it (eg close to no change in altitude of the GPS antenna or the drone center):

Interestingly it seems that only one direction of tilt introduced the error in altitude (or at least the error is stronger in that direction). Also, the error itself is a drift in altitude, not a proportional change.

The EK3_SRC_POSZ is set to GPS, and I have tried setting the EK3_SRC1 and EK3_SRC2 to None(0), with no effect.

Even setting the GPS_POS to the center of the drone (where the FCU and IMU are located), results in the same problem.

I have also tried to change the EK3_ALT_M_NSE but with no effect.

Any idea what could cause this and how to fix it?

The full bin file is available here: BIN file

Are you sure these GPS position measurements are correct? The value is in meters, so this would be about 35cm behind, 34cm left and 4cm up from the “origin”

Yes, the GPS antenna sits at the end of one of the arms, on a drone with around 90cm between the motors. The values are taken from a CAD model of the drone and should be pretty precise

What if you tilt the drone around the COG, more like it probably would do in flight?
The GPS unit would be changing altitude but the flight controller should be relatively static, and the altitude in the log should reflect a near-static value if everything is working as expected.

EDIT
you might want to set the flight controller position too, if it’s not so close to the centre.

1 Like

The samme issue exists in a pure roll or pitch movement. The flight controller is pretty close to the cog, so I doubt that’s the issue. Especially because in both cases, a negative roll has way more drift than a positive roll. If it would be a problem with the positions I would expect the drift to be symmetric