Skip to content
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

Wrong vertical speed and 2D speed #17

Open
sbonaime opened this issue May 4, 2021 · 8 comments
Open

Wrong vertical speed and 2D speed #17

sbonaime opened this issue May 4, 2021 · 8 comments

Comments

@sbonaime
Copy link

sbonaime commented May 4, 2021

Hi,
on my mac, with this Hero8 black footage
https://drive.google.com/file/d/1632G6hBeecq4KH8ukYSYOSU1RvS-v53G/view?usp=sharing
and using gopro2gpx and https://djitelemetryoverlay.com/srt-viewer I can see that the vertical speed is going from -448 to 335 km/h and the 2D speed reach 1576 km/h
Capture d’écran 2021-05-04 à 04-05-21 14 49 05

With https://goprotelemetryextractor.com/free/ and the same footage vertical speed is correct from 0 to 8.34 km/h and the 2D speed reach 29 km/h
Capture d’écran 2021-05-04 à 04-05-21 14 52 57

here is my command line. I used #15 version but it did not change the problem

gopro2gpx -v GH011227_saut.MP4 test
Working on file GH011227_saut.MP4 track 3 (Stream #0:3(eng): Data: bin_data (gpmd)
GPSFIX change to 3 [lock 3D (ok)]
-- stats -----------------
- Ok:                202
- GPSFIX=0 (bad):      0 (skipped: 0)
- Empty (No data):     0
Total points:        202
--------------------------
Working on file GH011227_saut.MP4 track 3 (Stream #0:3(eng): Data: bin_data (gpmd)
GPSFIX change to 3 [lock 3D (ok)]
-- stats -----------------
- Ok:                202
- GPSFIX=0 (bad):      0 (skipped: 0)
- Empty (No data):     0
Total points:        202
--------------------------
```

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)

ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
@Simske
Copy link
Contributor

Simske commented May 4, 2021

I just checked the elevation and speed data:
image
and everything seems fine there.

I'm guessing the problems comes from the time data: the time for every trackpoint is resolved to a second, but there are 20 trackpoints per second. When calculating the speed from elevation and location data this can lead to high numbers (or division by 0 error).
I don't know if the Gopro data has a higher time resolution which is just not outputted by gopro2gpx, otherwise you would need to just interpolate the time data inside of a second.

@sbonaime
Copy link
Author

sbonaime commented May 4, 2021

files size from
gopro2gpx 58k
https://goprotelemetryextractor.com/free/ 81k
In the begining of gopro2gpx gpx file, I can see that my camera is a gopro7-track. With goprotelemetryextractor it is a HERO8 Black.
It may explain why...
@Simske can you send my the gpx file you get ? Did you try to plot it with https://djitelemetryoverlay.com/srt-viewer ?

@Simske
Copy link
Contributor

Simske commented May 4, 2021

@Simske can you send my the gpx file you get ? Did you try to plot it with https://djitelemetryoverlay.com/srt-viewer ?

Yes, when I put it in I get the same results as you, so I assume our outputs are the same.

I just compared the files from goprotelemetryextractor.com and gopro2gpx, the data for a single trackpoint look like this:
goprotelemetryextractor.com:

<trkpt lat="46.0098989" lon="-1.3977705">
    <ele>0.514</ele>
    <time>2020-10-29T11:03:38.558Z</time>
    <fix>3d</fix>
    <hdop>104</hdop>
    <cmt>altitude system: MSLV; 2dSpeed: 7.301; 3dSpeed: 7.31</cmt>
</trkpt>

gopro2gpx

<trkpt lat="46.0098989" lon="-1.3977705">
    <ele>0.514</ele>
    <time>2020-10-29T11:03:38Z</time>
    <extensions>
    <gpxtpx:TrackPointExtension>
        <gpxtpx:hr>0</gpxtpx:hr>
        <gpxtpx:cad>0</gpxtpx:cad>
        <gpxtpx:speed>7.301</gpxtpx:speed>
        <gpxtpx:distance>0</gpxtpx:distance>
        </gpxtpx:TrackPointExtension>
    <gpxx:TrackPointExtension/>
    </extensions>
</trkpt>

As you can see from this:

  • I was right about the timestamps, resolution of 1 second is not enough
  • Speed and other additional data is written into a comment tag for goprotelemetryextractor, while gopro2gpx uses the Garmin GPX-extension to save only the speed.

I haven't worked directly on the decoding part of this package, maybe @juanmcasillas has an easy fix.

@sbonaime
Copy link
Author

@Simske I am diving into the code and I see a problem. The GPS decoded data we get does not have any millisecond data from Hero8 MP4 thus we have 20 points with the same datetime as you saw.

@younes-mirinezhad
Copy link

@Simske I am diving into the code and I see a problem. The GPS decoded data we get does not have any millisecond data from Hero8 MP4 thus we have 20 points with the same datetime as you saw.

I have the same problem.
is there any solution?

@Simske
Copy link
Contributor

Simske commented Jun 5, 2021

@younes-mirinezhad No sorry, I didn't have time to look at it yet

@JimmyS83
Copy link
Contributor

JimmyS83 commented Apr 24, 2022

Could you try with PR#24 ?

@FreudBH
Copy link

FreudBH commented Jun 8, 2024

Hello!
I noticed in the Update section "Added support for 18Hz resolution in GPS5 fourCC, to fix (#PR23,#PR17)[https://github.com//pull/24]. Thanks to (JimmyS83)[https://github.com/JimmyS83] for spot the problem."

Nevertheless I just run the last version and the speed is being calculated wrong. I am using GoPro Max 360.

GH010015_1717275916188.gpx.txt

gopro2gpx speed wrong

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

No branches or pull requests

5 participants