juanmcasillas / gopro2gpx

Parse the gpmd stream for GOPRO moov track (MP4) and extract the GPS info into a GPX (and kml) file.
GNU General Public License v3.0
181 stars 50 forks source link

gps frequency on different gopro models #42

Open stejadao opened 1 year ago

stejadao commented 1 year ago

For some reason the gopro hero 10 black has a frequency of 10hz and takes a GPSU time every 10 points. I don't know how it is in the others camera models.

I fixed the bug by taking only the first GPSU time, changing t_delta = 1/10.0 and setting p equal to:

p = gpshelper.GPSPoint(gpsdata.lat, gpsdata.lon, gpsdata.alt, GPSU + datetime.timedelta(milliseconds=len(points) t_delta 1000), gpsdata.speed)

This solves my problem, but it may be different in other models, I don't know if there is a way to read the frequency from the metadata or even if it is possible to directly read the timestamp of each gps point.