DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Incorrect EXIF GPS and Elevation

But you haven't actually read the thread - right? There is absolutely no mystery here - the contents of the EXIF file are perfectly clear and, other than the "GPS" label, are correct. You have relative and absolute barometric altitudes. There is nothing to fix. DJI could add the actual GPS absolute altitude - is that what you are asking for?

Hi Sar104,
thanks for all your excellent posts on this topic..... I don't know if I would have persevered to the extent you have.... love your work!
But to get to the point.... YES, I have read the thread, and I DID know that the ABS and REL altitudes in the XMP EXIF were barometric.
I also knew that the ABS alt was copied over to the GPS Alt if > 0, and the GPS Alt set to zero otherwise....
So, I know and accept all that... and with that said, the below comments are in NO WAY meant to be facetious... they are genuine comments, and a plea for help.

So...... with the Mavic 2 Pro there still seems to be a problem as far as mapping goes (Drone Deploy / Maps Made Easy etc)..... they seem to want to use the GPS Alt....
Here is a RL example where things are going wrong for me:
Pic #1 (UAV sitting on the ground):
Lat: -26.7662935 (I assume spot on)
Long: +153.1011910 (I assume spot on)
GPS Alt: 0 m (understandable because of Abs Alt being < 0)
Abs Alt: -0.90 (Whoops!!!!! if should be +5 metres, and this is just at this particular location... others are out by a lot more)
Rel Alt: 0.0(spot on - on the ground)

Pic #2 (approx 71 m in the air according to the remote controller):
Lat: -26.7676029 (I assume spot on)
Long: +153.1009848 (I assume spot on)
GPS Alt: 72.4 m (I assume spot on)
Abs Alt: 72.48 (I assume spot on)
Rel Alt: +71.70 (even thought this is only out by a small amt, it is not 72.48 - 0.90)

So, you see that this is causing issues....... I do mapping exercises, and the elevation maps are crazy......
They are probably correct in terms of relative elevation, ie spot A is 10 metres above spot B.... but where spot A is being recorded as -15 metres, when it is really +10 metres (or whatever the figures in RL are), you can see that this is no good for mapping....

One could say, "Don't use the Mavic 2 Pro for mapping".... but the Phantom 4 or the Mavic Pro don't have this problem (AFAIK)... so it comes back to the Mavic 2 Pro..... problem.

So, in fact.... I would say that this IS a problem.

Mike
 
Hi Sar104,
thanks for all your excellent posts on this topic..... I don't know if I would have persevered to the extent you have.... love your work!
But to get to the point.... YES, I have read the thread, and I DID know that the ABS and REL altitudes in the XMP EXIF were barometric.
I also knew that the ABS alt was copied over to the GPS Alt if > 0, and the GPS Alt set to zero otherwise....
So, I know and accept all that... and with that said, the below comments are in NO WAY meant to be facetious... they are genuine comments, and a plea for help.

So...... with the Mavic 2 Pro there still seems to be a problem as far as mapping goes (Drone Deploy / Maps Made Easy etc)..... they seem to want to use the GPS Alt....
Here is a RL example where things are going wrong for me:
Pic #1 (UAV sitting on the ground):
Lat: -26.7662935 (I assume spot on)
Long: +153.1011910 (I assume spot on)
GPS Alt: 0 m (understandable because of Abs Alt being < 0)
Abs Alt: -0.90 (Whoops!!!!! if should be +5 metres, and this is just at this particular location... others are out by a lot more)
Rel Alt: 0.0(spot on - on the ground)

Pic #2 (approx 71 m in the air according to the remote controller):
Lat: -26.7676029 (I assume spot on)
Long: +153.1009848 (I assume spot on)
GPS Alt: 72.4 m (I assume spot on)
Abs Alt: 72.48 (I assume spot on)
Rel Alt: +71.70 (even thought this is only out by a small amt, it is not 72.48 - 0.90)

So, you see that this is causing issues....... I do mapping exercises, and the elevation maps are crazy......
They are probably correct in terms of relative elevation, ie spot A is 10 metres above spot B.... but where spot A is being recorded as -15 metres, when it is really +10 metres (or whatever the figures in RL are), you can see that this is no good for mapping....

One could say, "Don't use the Mavic 2 Pro for mapping".... but the Phantom 4 or the Mavic Pro don't have this problem (AFAIK)... so it comes back to the Mavic 2 Pro..... problem.

So, in fact.... I would say that this IS a problem.

Mike

In your examples - I'm still confused. Where are you getting the GPS altitude? If from the EXIF then it's not GPS altitude - it's barometric absolute altitude and it's almost never correct. The EXIF absolute altitude and "GPS altitude" fields are the same quantity (except if the former is less than zero). There is no GPS altitude recorded in the EXIF data. If you want even remotely good absolute altitudes then you will have to use the actual GPS data from the DAT log files.

They all do this the same way, last time I looked, so it's not just a Mavic 2 problem.
 
Thanks SAR,
Please don't take any of my comments as negative.... I am just trying to be helpful (as I know you also are).

Yes, as I mentioned in my note, I DO realise that "the EXIF absolute altitude and "GPS altitude" fields are the same quantity".
I take your point.... in future, I will take the starting GPS altitude either from the DAT file, or from an elevation site like Find Your Feet Above Sea Level I can then easily update the EXIF GPS Altitude using something like EXIFTools
I just need to do a real test (on a mapping site), with the updated figures.

Mike
 
I think we need to stop hounding on whether the GPS in EXIF is barometric or GPS as that's not the point. If it were, we wouldn't see altitude as zero when abs altitude is negative.

Unless the EXIF reader is rejecting the abs altitude when negative and instead displaying zero. That would be a problem with the reader. Because the abs altitude is barometric rather than actual GPS, it could easily read negative. Unless you live in New Orleans, abs GPS wouldn't be negative. But since some dry places in this world are indeed below sea level, a reader needs to accept negative values.

Relative altitude (derived from GPS or barometer) should never be zero in flight.
 
I think we need to stop hounding on whether the GPS in EXIF is barometric or GPS as that's not the point. If it were, we wouldn't see altitude as zero when abs altitude is negative.

Unless the EXIF reader is rejecting the abs altitude when negative and instead displaying zero. That would be a problem with the reader. Because the abs altitude is barometric rather than actual GPS, it could easily read negative. Unless you live in New Orleans, abs GPS wouldn't be negative. But since some dry places in this world are indeed below sea level, a reader needs to accept negative values.

Relative altitude (derived from GPS or barometer) should never be zero in flight.

That's not quite correct, and I don't understand why there is still any confusion over this issue. The fact that the reported "GPS altitude" is actually barometric is exactly the point, because that's why it is generally so far off. As I've explained repeatedly, there are four fields in the EXIF data that are relevant:

Absolute Altitude : +37.91 >>> this is the barometric absolute altitude calculated from the measured pressure and assuming a standard atmosphere.
Relative Altitude : +40.80 >>> this is the altitude relative to the takeoff elevation calculated from the change in pressure, again assuming a standard atmosphere.
GPS Altitude : 37.9 m Above Sea Level >>> this is the same as the "Absolute Altitude" field, with one less decimal place and also set to zero by the camera if "Absolute Altitude" is negative.
GPS Altitude Ref : Above Sea Level >>> this reads "Above Sea Level" if "Absolute Altitude" is positive and "Below Sea Level" if "Absolute Altitude" is negative.

The EXIF readers are simply reporting those fields - they are not interpreting anything and they will display negative values if they are negative in the EXIF data. In the example earlier:

Absolute Altitude : -76.69 >>> the local pressure is high, due to a high pressure weather system, and so in terms of a standard atmosphere profile it is below sea level.
Relative Altitude : +31.60 >>> the aircraft is currently 31.6 m above its takeoff point, based on the reduction in pressure from takeoff.
GPS Altitude : 0 m Above Sea Level >>> the camera has arbitrarily set this field to zero because "Absolute Altitude" is negative.
GPS Altitude Ref : Below Sea Level >>> now saying below sea level because "Absolute Altitude" is negative.
 
There is something wrong on this picture...
If we use DJI GS PRO on IOS, the gps altitude has values !
If we start with this aplication, then we go to DJI GO 4, the gps altitude is there... when before was zero !

So did dji made a way to DJI GS PRO trigger the function to insert altitude data on GPS Altitude ??
 
Thanks for the indepth explanations sar104, good stuff.
 
Last edited:
There is something wrong on this picture...
If we use DJI GS PRO on IOS, the gps altitude has values !
If we start with this aplication, then we go to DJI GO 4, the gps altitude is there... when before was zero !

So did dji made a way to DJI GS PRO trigger the function to insert altitude data on GPS Altitude ??

I'm sorry but if, at this point, you still don't understand, then I don't think there is any more I can do.
 


See this video to see how to repair please !

That's all fine, but you still need to bear in mind that there are no GPS altitude data in the EXIF, despite those field names. And the relative altitude that you are copying is just that - barometric altitude relative to the take off point. What is the point of putting that in the GPSAltitude field? It's only going to be correct, and even then only approximately, if you take off from sea level.

If you need absolute altitude then a much better approach is to extract the actual GPS altitude from the flight DAT file - that will give you the correct altitude AMSL, usually to within a couple of meters, as I've explained multiple times in this thread.
 
If you have 900fotos you will have lots of work to do that getting the value from the dat.
This is for mapping gsm towers, and statue mapping, so for now is ok with this procedure.
Dji must also repair this meanwhile...
 
If you have 900fotos you will have lots of work to do that getting the value from the dat.
This is for mapping gsm towers, and statue mapping, so for now is ok with this procedure.
Dji must also repair this meanwhile...

Agreed - it would be more work to use the DAT data.
 
Regarding P4 RTK there seems to be different tags for altitude.

From DJI FAQ:
4.Do images captured by the Phantom 4 RTK store altitude any information? If so, how is this data stored?
Elevation and relative altitude (relative to your takeoff point) are stored in photos captured by the Phantom 4 RTK. Absolute altitude can be used for mapping, and relative altitude can be found in the XMP file.

4.How is the Phantom 4 RTK camera calibrated?
Each Phantom 4 RTK camera goes through a calibration process that measures the distortions of the lens, and records the corresponding undistort parameters in XMP DewarpData. When the “distortion correction” is switched off, the original image with distortion will be generated.

6.How do I find the XMP information of my Phantom 4 RTK photos?
Open the photo in text format and search "XMP" to find this information on each photo.
XML:
   drone-dji:AbsoluteAltitude="+116.56"

   drone-dji:RelativeAltitude="+69.95"

   drone-dji:GpsLatitude="43.36511377"

   drone-dji:GpsLongtitude="141.81345593"

   drone-dji:RtkFlag="50"

   drone-dji:RtkStdLon="0.01274"

   drone-dji:RtkStdLat="0.01122"

   drone-dji:RtkStdHgt="0.02394"
 
I’m having trouble as well. I’m just simply using ArcGIS Pro to make photo point maps. All of my inspire 1 photos work great. Mavic 2 on the other hand continues to be a head ache. I have a few work arounds but I’m hoping that If I take a photo before take off, use it as a gcp referencing elevation, as a surface reference in the map along with the relative altitude that will solve the problem. Has anyone tried this?
 
Is that output in absolute altitude? Can I view the script?
The altitude you see in Exif info is absolute altitude.
If you look deeper, into the XMS section, relative altitude is also recorded.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,255
Messages
1,561,360
Members
160,207
Latest member
bullet_magnet