Combining overlapping logs results in truncated file

A place for the community to help each other out with getting the most out of the Combine FIT, GPX or TCX files for Strava Upload Tool.
Post Reply
ryan_gotoes
Posts: 3
Joined: Thu Jan 14, 2021 5:38 am

Combining overlapping logs results in truncated file

Post by ryan_gotoes »

I want to combine two logs that overlap. The first is from a garmin with heart rate data, and the second is from a phone. I started the phone at the top of a very long descent because I knew the garmin would die.

I tried editing the timestamps as shown here: viewtopic.php?f=2&t=18

However, every time I export, the 2nd file's data is heavily truncated. When combined, the ride should be a big loop. I would not like to remove any heartrate data from the first file if possible.

As another debugging step, I tried just merging the 2nd file (with no other file) and uploading that, but the exported file is much shorter than the original.
Attachments
two_rides.zip
(170.95 KiB) Downloaded 389 times
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Combining overlapping logs results in truncated file

Post by fulmar2 »

Ryan -

It appears that the 2nd file you sent (the one from the iPhone) is actually corrupted. Check out the attached image.

Corrupted file
Corrupted file

In the attached image, you will see a pink line (that represents your Garmin 25).

Next you will see the orange line. That is the iPhone file you sent me. It is corrupted, as it ends at 12:46:39...

So, I uploaded your corrupted iPhone file to Strava, and they got the remaining missing part out of it. Then I exported it from Strava as GPX, and uploaded it to my tool (just that one file; like you did: used the merger with one file). When I did that, I also did a crop so it would begin at 12:43:48... the exact same second as the pink line ends. That is what you see as the yellow line in my image.

I went ahead and unchecked all the boxes for the orange line, and combined everything from the pink and yellow lines.

Congratulations - that was a lot of climbing!

Best,
Brian
ryan_gotoes
Posts: 3
Joined: Thu Jan 14, 2021 5:38 am

Re: Combining overlapping logs results in truncated file

Post by ryan_gotoes »

Thanks!

Not sure how the second file got corrupted as it was a direct export from Strava, ironically from an Android device. Even in Strava, part 2 shows the full length. Very odd.

Yes, I broke both my distance and elevation in it.


Thank you very much. edit: The file you sent via dm is corrupted. Looking into fixes.
User avatar
GotoesUser
Posts: 26
Joined: Wed Nov 25, 2020 2:32 pm

Re: Combining overlapping logs results in truncated file

Post by GotoesUser »

I have sent you a repaired file. It should be fixed now. Please report back.
ryan_gotoes
Posts: 3
Joined: Thu Jan 14, 2021 5:38 am

Re: Combining overlapping logs results in truncated file

Post by ryan_gotoes »

The issue is resolved.
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Combining overlapping logs results in truncated file

Post by fulmar2 »

I figured out what the problem with your file was. In the FIT export produced by Strava, every other point was empty. My tool counts the number of valid point in the file, then it reads them all in. So, let's say there were 5,000 points in the file, my tool will read 5,000 points. The problem is that there are actually 10,000 points - every other one is empty... my tool was reading the 5,000 points, half of which were empty... and then stopping because the header said that was the end of the file. Effectively, it was only reading half the file.

So now my tool now looks for this type of corruption and resolves it. In the last couple days, people have been contacting me with quite a few different types of corruption in files exported from Strava. It seems as if their export corruption may be connected to their phone app. Anyway, Strava seems to be able to read their own corrupted files, but (most) 3rd party apps are going to struggle with their files until they get it fixed.
Post Reply