I want to generate records from course GPX and lap info

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
jpencis
Posts: 4
Joined: Fri Apr 25, 2025 2:10 pm

I want to generate records from course GPX and lap info

Post by jpencis »

Hello!

Tried to fix it with many different tools, but so far no luck...

I have an activity: MTB ride for 82+ km. I have hard paused the activity couple of times because of my watch losing connect with HRM after I do something on my phone. As a result I have lap information with coordinates, but no point records in between for majority of the distance.
Fix tool cuts off at 52 or something km - up to the point where there is still some data about track points.

Tried to interpolate both: the activity and the course, and then to use the course as fake track. It worked to some degree, but not as good as I expected.

Tried to use FIT to CSV to manually add record rows from lap rows, but the export file did not contain the data (or I could not find it).
I believe interpolated course (or even initial course) could help me to add missing records to the laps, but then it should read points between lap records without looking at time (the course file contains some weird time info, even if I tried to set expected time in Garmin Connect when I was drawing the course).

So, is there any idea how to fix my activity (attaching both activity and course)?
Attachments
18882528066.zip
(118.52 KiB) Downloaded 22 times
User avatar
fulmar2
Site Admin
Posts: 272
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: I want to generate records from course GPX and lap info

Post by fulmar2 »

Hey! I tried to fix your original activity file using the "Generate Fake Track" option. That would have been the best option to solve this, so I will outline the steps - even though in your case, it's not going to help much.

Normal Procedure
1) First, make sure you are logged in to a GOTOES account. This is needed so GOTOES can store your Course File.
2) Next, upload the activity file to the GOTOES merge tool - the file that needs to be repaired.
3) On the subsequent page, Check the drop down near the "Make Fake Track" option, and select "Custom"
4) Upload your Course File to the new window. If the course file is good, you should get a green message. You can close the inner window if everything worked.
5) Make sure that the checkbox near "Make Fake Track" has been checked... and export!
For Step 3, where to find the "Make Fake Track" option.
For Step 3, where to find the "Make Fake Track" option.
In your situation, I found that your activity file had only 145 points! Most of the data was missing! So, here is how I addressed that issue, knowing that the final result will only be as good as one could achieve with the limited data set.

Special Procedure For Your Files
1) Logged into my GOTOES account.
2) Uploaded your Activity to the GOTOES merge tool.
3) Made sure all the checkboxes for the streams were checked, and then checked the "Interpolate Track" box. Because you had good signal at the start of the activity, those points were not adjusted much, but for the last 11,000+ seconds of the activity, the data was pretty much all fabricated. I exported the interpolated track with its 11,386 track points. I called it "Interpolated.fit"
4) Because your course file had appeared to have around 4,000 track points, I decided to thin out the interpolated track to more closely match your course file. To do this, I uploaded "Interpolated.fit" from the previous step to the GOTOES merge tool. This time, I again made sure all of the desired checkboxes were checked in the streams, and then I selected "Use Every Third Trackpoint" from the "Add / Remove / Edit Track points (Optional)" menu. The reason I chose every third is because you originally had 11,386 tracepoints after the interpolate, and 3,795 (the result after discarding tracepoints) was more closely aligned with the ~4,000 tracepoints in your course file. This step is not absolutely necessary, but the tool will go a lot faster if it is only parsing 3,000 points vs 11,000.. I exported this file as "Every Third.fit"
5) I now uploaded the "Every Third.fit" file from the previous step to the GOTOES merge tool. At this point, I made sure all of the desired streams were checked. Then, I went down to the "Make Fake Track" section and selected "Custom" in the drop down menu. I had already loaded your course into memory from my initial attempt, You may have to do that if you haven't done it already. After that, I made sure that the checkbox "Make Fake Track" was checked.
6) Exported the file (attached to this post). It looked good to me. It is called "Final.fit"

All of this took less time than writing the first step of this tutorial.

The way the tool works is that it reads in the point-to-point distance covered in your source activity file. Then, the tool takes your course file and reads it into memory, measuring the point-to-point distance covered in your course. The tool then takes the distance calculated from your live activity (for each point) and finds which coordinates correspond to that distance traveled in your course file. It then substitutes in the points from the course into your final file, making for a realistic speed traveled. In your situation, you only had 145 source points - mostly at the beginning of the activity. When we did the "interpolate" option, we created a track that had more points, basically averaging out the speed/distance over those missing ~11,000 points. That manages to get your some average speed data, even though it's not going to be totally realistic. You will see a flat-line speed for the portion that was interpolated. Usually, this is "good enough," and we can do the "Normal Procedure". In your case, the "Special Procedure" was required due to the lack of points.
Attachments
Final.fit
Final Result
(145.3 KiB) Downloaded 43 times
jpencis
Posts: 4
Joined: Fri Apr 25, 2025 2:10 pm

Re: I want to generate records from course GPX and lap info

Post by jpencis »

I feel kind of guilty you had to do all of this. I see the result file and... it was what I already managed to do before writing here. Tho, your steps are slightly more efficient compared to what I did.

I played slightly with adding points. First of all, I added end point (took data from session end). This helped me to get desired full distance, but it still did not help with full course. I was thinking of adding lap coordinates as point records, but with the tool I have it is not that easy (basically, it is manual and annoying process). If it would be possible to somehow automatically add data from laps as data for points, it would greatly help to tie course to activity. At least it is my way of thinking.
User avatar
fulmar2
Site Admin
Posts: 272
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: I want to generate records from course GPX and lap info

Post by fulmar2 »

Oh, don’t worry! Part of the reason I wrote more detail was to help other people experiencing similar issues.

Meanwhile, about your track: maybe when I get home (in 3 days) I can help you better. I did all that from my phone, but looking at details is easier on a computer. At first, I thought that what I produced was going to be the full track, but then I realized that with so much distance missing from your original track, there probably isn’t enough distance to “fill up” your course. Does that make sense now that you know how the tool works?

Since you have so little “real” data, maybe we could do this.

1) Upload your course to the timestamp tool and set the start time to match that of your real activity. Be sure you have the correct time zone set.

2) Enter an average speed that matches your average speed. The idea is to get the activity duration to match your real activity. To make it easier, select “No” instead of “Bike” or “Run”.

3) When you get to the settings page for gotoes, look at the duration in seconds and make sure it matches your real activity.

4) Export this time stamped course.

5) Upload this timestamped course along with your real activity. They two activities should produce overlapping bars in the timeline. Check the position stream from the time stamped course. De-select the position checkbox from the real activity. Then, deselect everything else from the time stamped course and select whatever you want like laps from the real course. Merge and export.

I can do this for you or something better once I get home.
jpencis
Posts: 4
Joined: Fri Apr 25, 2025 2:10 pm

Re: I want to generate records from course GPX and lap info

Post by jpencis »

Thanks! It helped to some degree.

I was playing with the timestamp tool regarding my course, but it was not good until I saw the red message about my course being to dense with track points. Decreased drastically those points and then tried to match speed to obtain the correct end time. Almost succeded ;)

Then combined activity and course and took only course position stream (this was my mistake before - I left both streams at the beggining).
Then slightly played with track points on the map (it would be nice to have undo option here, since I had to restart several times when deleted wrong point) and ...

https://www.strava.com/activities/14303945825

I lost 4km with all the magic, but the track is there and I can live with this. I know it could be even better, but I am satisfied with the result. So, once again - thanks and you have wonderful tools.
User avatar
fulmar2
Site Admin
Posts: 272
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: I want to generate records from course GPX and lap info

Post by fulmar2 »

Great. By the way, if you export from GOTOES as "FIT" format, you can simply override the distance value to anything that you want - whereby you could reclaim the missing 4km.
jpencis
Posts: 4
Joined: Fri Apr 25, 2025 2:10 pm

Re: I want to generate records from course GPX and lap info

Post by jpencis »

Well, took your advice and fixed the distance too. :) Everything looks perfect now.

https://www.strava.com/activities/14306418424
Post Reply