What exactly is the DJI iOS SDK giving me in the takeoffLocationAltitude field of DJIFlightControllerState?

Viewed 92

I am trying to get my hands on the WGS84 altitude (a.k.a. ellipsiodal altitude, or GPS altitude, or height above reference ellipsoid) of the drone. The altitude field of the flight controller state is populated with height above takeoff location, based on a barometer. It would seem that I could add this to the field takeoffLocationAltitude to get aircraft altitude but this seems to give terribly wrong values (far beyond expected vertical error for a typical GPS receiver). At my location I was getting a value of 246 when my true ground altitude (measured with a survey-grade receiver) was 298 (+/- 1 m).

This leads me to believe that I am misinterpreting what takeoffLocationAltitude actually is. The iOS documentation says "Relative altitude of the aircraft home location relative to sea level, in meters." This would suggest it is giving height above the geoid instead of height above the reference ellipsoid, but this also can't be right since the geoid undulation at my location was negative (so this pushes the numbers about 25 meters even farther apart).

Does anyone know what takeoffLocationAltitude is and where this number comes from? Is this even derived from the GPS solution? Regardless, is there a "correct" way to get WGS84 altitude of the aircraft?

Update: I've learned some more here. At the same location on another day takeoffLocationAltitude gave me 310 m (on a previous day it was 246 m). I have a suspicion that the drone is latching the GNSS altitude (either WGS84 or converted to height above geoid) almost immediately on GNSS fix. If using a sub-par, single-constellation receiver in a moderate noise environment you could get vertical channel errors this big... especially right at first fix when you aren't tracking many satellites and have relatively poor GDOP. If I'm right this is rather disappointing, but I can't come up with another good explanation for the huge variability in this field.

In any event, if this field can vary by 64+ m at a given location, then getting the exact interpretation right is, needless to say, not very important. The field simply can't be relied on.

1 Answers

I think you correct. It's latched way to early, and it completly useless. It can be solved by lookup the altitude in a online database from your coordinates. I havn't seen any other way... I will try to check if something can be done with the dumledore msgs.

Related