Closed paolobenve closed 3 years ago
FWIW, could leverage the proj
library for this (minimal C implementation needed of the full GeographicLib), as it seems to be widely available.
Python example: https://stackoverflow.com/questions/38451828/how-to-iterate-between-two-geo-locations-with-a-certain-speed-in-python3
Maybe you could apply your gpx file directly to the rawfiles with exiftool. The documentation at https://exiftool.org/geotag.html states: The GPS track log file is loaded, and linear interpolation is used to determine the GPS position at the time of the image
Linear interpolation doesn't work that well for "use case 1", but is an ok approximation and this is indeed a very neat way of addressing "use case 2".
On the principle I don't disagree with the suggested change but I don't find the 2 use cases motivating.
The gpx track has to be drawn by geodesic interpolation, too
The gpx track has to be drawn by geodesic interpolation, too
Why ? What is the benefit ?
The gpx track has to be drawn by geodesic interpolation, too
Why ? What is the benefit ?
In order to address the first use case.
Here is the difference:
without this PR: the three images are set at the beginning of the line, which is straight:
with this PR: the images are set at there position according to timestamp, and the line is the geodesic one
Looks great. Why do we have a small straight segment on Madrid side ?
Because the track has 4 points, the big interval in between the 2nd and the 3rd
It looks like darktable, when geotagging images through a gpx file, assigns latitude/longitude choosing one of the points in the gpx file.
I wish it were not choosing one of the point, but interpolating between the last of the previous (temporarily) points and the first of the following ones.
Use case 1 ======
Last month I flyed across the Atlantic Ocean, and took some photo in the middle of the Ocean. I had begun recording the gpx with OSMAnd before leaving in order to geotag the photos. Unfortunatly, the airplane isn’t transparent to gpx satellite signals, so my gpx file only took the points before entering and after exitibg the aircraft.
As darktable works currently, through that gpx file I get the photo geotagged at the airports of departure and arrival.
Use case 2
The app that generates the gpx file is set to record a point every minute, but the user moves a certain space every minute and shoots various photos, so the photos would remain stuck at the points where the gpx fixed the coordinates