Setting GPS:GDop from GPS track

Started by StarGeek, November 03, 2024, 02:57:56 PM

Previous topic - Next topic

StarGeek

I ended up going down a rabbit hole of technical GPS stuff based upon a question elsewhere. Based upon that, this thread and this ChatGPT session, it seems to me that when geotagging

The GPS:GPSDop should be set from "pdop" and GPS:GPSMeasureMode should be set to "3-Dimensional Measurement" if "pdop" exists
else
The GPS:GPSDop should be set from "hdop" and GPS:GPSMeasureMode should be set to "2-Dimensional Measurement" if "hdop" exists

Edit: Here's the discussion on GeoTagNinja's github page that started this for me.an
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Thanks for this note.  Any idea what to do if pdop isn't available but hdop and vdop are?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on November 04, 2024, 05:14:35 PMAny idea what to do if pdop isn't available but hdop and vdop are?

Like I said, write hdop if pdop isn't available.

The EXIF spec says of GPSDop
QuoteIndicates the GPS DOP (data degree of precision). An HDOP value is written during two-dimensional measurement, and PDOP during three-dimensional measurement.

I take that to mean that if pdop (three-dimensional measurement) isn't available, you would default to hdop (two-dimensional measurement).

Though it seems to me that if both hdop (horizontal degree of precision) and vdop (verticle degree of precision) exist, there should be a pdop. This PDF is referenced by the wikpedia page on Dilution of precision and on page three of that PDF it says this (Pythagorean theorem?)
QuoteNote that PDOP2 = HDOP2 + VDOP2,

The whole thing is a bit over my head, but I guess the sequence could be
if PDOP {
    set GPS:GPSDop  = PDOP
    set GPS:GPSMeasureMode = 3-Dimensional Measurement
}
else if HDOP & VDOP {
    set GPS:GPSDop  = sqrt(HDOP^2+VDOP^2)
    set GPS:GPSMeasureMode = 3-Dimensional Measurement
}
else if HDOP {
    set GPS:GPSDop  = HDOP
    set GPS:GPSMeasureMode = 2-Dimensional Measurement 
}


As it is, there hasn't been anyone asking for this other than Mobilis (by way of the GeoTagNinja page), so it's hard to tell what the correct solution is.

If you like, I can ask some questions about the best procedure on some of the sub-reddits such as /r/GIS (Geographic Information Systems) or /r/Surveying.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

OK, thanks.  I just thought there might be some formula to calculate pdop from hdop and vdop.  But it isn't that important to worry about it.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).