Skip to content

use better gps measurement for videos #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2023
Merged

Conversation

inode64
Copy link
Contributor

@inode64 inode64 commented Apr 10, 2023

It has happened to me in many videos that the first GPS measurements result in incorrect locations, I have analyzed the tags and seen that when the speed is 0 it is not a correct GPS value

I get the data with exiftool -ee video.mp4

example:

.
.
.
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:35.100
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 0 deg 0' 0.00" N
GPS Longitude                   : 0 deg 0' 0.00" E
GPS Altitude                    : -17 m
GPS Speed                       : 0
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:35.300
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 19 deg 32' 54.09" N
GPS Longitude                   : 12 deg 56' 8.08" W
GPS Altitude                    : 3369.107 m
GPS Speed                       : 0
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:35.400
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 32 deg 11' 3.69" N
GPS Longitude                   : 14 deg 28' 14.32" W
GPS Altitude                    : 3977.121 m
GPS Speed                       : 0.008
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.400
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 721.89 m
GPS Speed                       : 0.011
GPS Speed 3D                    : 0.02
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.500
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.055 m
GPS Speed                       : 0.014
GPS Speed 3D                    : 0.01
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.700
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.004 m
GPS Speed                       : 0.013
GPS Speed 3D                    : 0.01
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.800
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.193 m
GPS Speed                       : 0.031
GPS Speed 3D                    : 0.03
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:39.800
GPS Horizontal Positioning Error: 1.62
GPS Latitude                    : 40 deg 46' 8.77" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.134 m
GPS Speed                       : 0.022
GPS Speed 3D                    : 0.02
.
.
.
.

but with the timelapse videos that there is little speed, below 0 it does not locate the video
It looks like a problem with the gopro-utils/telemetry library, but I don't get that far in Go

Example:

.
.
.
.
GPS Date Time                   : 2023:02:18 13:39:35.100
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 0 deg 0' 0.00" N
GPS Longitude                   : 0 deg 0' 0.00" E
GPS Altitude                    : -17 m
GPS Speed                       : 0
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:35.300
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 19 deg 32' 54.09" N
GPS Longitude                   : 12 deg 56' 8.08" W
GPS Altitude                    : 3369.107 m
GPS Speed                       : 0
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:35.400
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 32 deg 11' 3.69" N
GPS Longitude                   : 14 deg 28' 14.32" W
GPS Altitude                    : 3977.121 m
GPS Speed                       : 0.008
GPS Speed 3D                    : 0
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.400
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 721.89 m
GPS Speed                       : 0.011
GPS Speed 3D                    : 0.02
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.500
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.055 m
GPS Speed                       : 0.014
GPS Speed 3D                    : 0.01
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.700
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.004 m
GPS Speed                       : 0.013
GPS Speed 3D                    : 0.01
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:37.800
GPS Horizontal Positioning Error: 1.64
GPS Latitude                    : 40 deg 46' 8.78" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.193 m
GPS Speed                       : 0.031
GPS Speed 3D                    : 0.03
GPS Measure Mode                : 3-Dimensional Measurement
GPS Date Time                   : 2023:02:18 13:39:39.800
GPS Horizontal Positioning Error: 1.62
GPS Latitude                    : 40 deg 46' 8.77" N
GPS Longitude                   : 0 deg 19' 44.77" E
GPS Altitude                    : 722.134 m
GPS Speed                       : 0.022
GPS Speed 3D                    : 0.02
.
.
.
.

Type:

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Camera:

  • GoPro
  • Insta360
  • DJI
  • Android
  • This PR adds a new camera

Component:

  • Core logic
  • Import
  • Merging
  • Firmware Update
  • Video Manipulation

Checklist before approval:

  • Linter pass
  • Build pass

@KonradIT
Copy link
Owner

Not sure if this is the way to go, considering the speed variable can be 0 and the location be correct (if the camera is stationary). Adjust your gps_accuracy value in the config like so:

$ cat ~/.mmt.yaml
gopro:
    gps_accuracy: 400 # 500 by default, lower is better

@inode64
Copy link
Contributor Author

inode64 commented Apr 10, 2023

ok, I'll try that parameter,
But if you see the first log, you will see that first it is in a GPS location

GPS Date Time : 2023:02:18 13:39:35.300
GPS Horizontal Positioning Error: 1.64
GPS Latitude : 19 deg 32' 54.09" N
GPS Longitude : 12 deg 56' 8.08" W
GPS Altitude : 3369.107 m
GPS Speed : 0
GPS Speed 3D : 0

and then jump to the correct location.

GPS Date Time : 2023:02:18 13:39:37.500
GPS Horizontal Positioning Error: 1.64
GPS Latitude : 40 deg 46' 8.78" N
GPS Longitude : 0 deg 19' 44.77" E
GPS Altitude : 722.055 m
GPS Speed : 0.014
GPS Speed 3D : 0.01

and about the fixed camera, I have always seen GPS errors because they do not have a professional quality. And even then when done for precision measurements it leaves for several minutes to improve accuracy (but that's another level of GPS).

look at the second log and you will see that there is always a speed even if it is 0.014, 0.013, 0.022, etc...

@KonradIT
Copy link
Owner

Just confirmed with a static camera on the roof of a building, it does lead to

GPS Speed                       : 0.042
GPS Speed 3D                    : 0.05

Being set. So speed == 0 would indeed eliminate bad readings.

@KonradIT KonradIT merged commit ee64438 into KonradIT:development Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants