Forgot to record half a bike ride. Thoughts on my solution?
NorthCascades
Posts: 10,968 Member
Last night I got sent to the grocery store, and went by bike. There was some chaos outside the store when I left, and I wound up forgetting to record the ride home on my Garmin. I use the Gear Tracking feature to know when to do all kinds of maintenance, and also like having the number of miles and feet of elevation gain in my reports, and an odometer reading for my bike, so I want to correct this as best I can. Luckily, I took the same route home.
Here's what I did:
* Export the first half of my ride as a TCX file
* Use SQL Server to reverse the order of the points in the route & add 15 minutes
* Save the result as a GPX
* Upload manually to Garmin Connect
It works. Unfortunately it only works if the file I create has a time stamp on each point. So it looks like I flew up the hills and crawled down. Also, I'm throwing HR and power away because those values would be completely different on the way home.
Is this the best I can do, or is there a better way?
Here's what I did:
* Export the first half of my ride as a TCX file
* Use SQL Server to reverse the order of the points in the route & add 15 minutes
* Save the result as a GPX
* Upload manually to Garmin Connect
It works. Unfortunately it only works if the file I create has a time stamp on each point. So it looks like I flew up the hills and crawled down. Also, I'm throwing HR and power away because those values would be completely different on the way home.
Is this the best I can do, or is there a better way?
0
Replies
-
My main question is why? What are you trying to accomplish? I'd just chalk it up to a bonus.6
-
I'm trying to accomplish knowing how many miles I have on all of the parts that wear and need maintenance, like I said in the OP.0
-
That's probably the best you can do, unless you duplicate the ride on a different day, then change the dates and upload that overwriting the ride you messed up4
-
Sounds like you did exactly what you intended to accomplish on the mileage. Make notes on that ride that the second half is just a reversal so you know in case you go back looking over performance data. Otherwise, the mileage should be accurate enough for maintenance purposes.2
-
You must be a numbers geek!! High five!!3
-
How much biking do you do on average?
In the grand scheme of things, how much of a difference will this one half-bike-ride make? If you are a once daily rider, we are talking about something that comprises less than 0.2% of your annual mileage, right?
(1/365 = 0.00273972602 This is just absolute number of rides. We aren't even talking about actual mileage.)
If you ride even more often than that, then we are talking about even less of a hit.
I understand your desire for precision. I like to be precise as well. However, sometimes you've got to let go of the trees and focus on the forest.
4 -
I could get on Endomondo, Create and log the route on Endomondo then export the .gpx to your pc. Then upload it to your ecosystem of choice.
I know Garmin, Strava, and Ride With GPS will allow you to create route. But not log them.... Endo will allow you to create then log out that route.1 -
This is the query I used, if anybody else ever finds the need for it. Took me about an hour to come up with this.
Declare @tcx xml Set @tcx = N' ... ride data export goes here ... ' Create Table #Track (Ele decimal(15, 10), Lat decimal(15, 10), Lon decimal(15, 10), Time DateTime, ID int identity not null) Insert #Track (Ele, Lat, Lon, Time) Select r.value('*:AltitudeMeters[1]', 'decimal(15, 10)') AltitudeMeters, r.query('*:Position').query('//*:LatitudeDegrees[1]').value('*:LatitudeDegrees[1]', 'decimal(15, 10)') LatitudeDegrees, r.query('*:Position').query('//*:LongitudeDegrees[1]').value('*:LongitudeDegrees[1]', 'decimal(15, 10)') LongitudeDegrees, DateAdd(minute, 15, r.value('*:Time[1]', 'dateTime')) Time From @tcx.nodes('//*:Trackpoint') Trackpoint(r) Declare @m int, @startTime nvarchar(max), @xml nvarchar(max) Select @m = Max(ID) From #Track Set @startTime = '2016-08-26T03:05:00.000Z' Select @xml = ( Select lon '@lon', lat '@lat', ele, DateAdd(second, -ID, @startTime) time From #Track Order By ID Desc For Xml Path('trkpt'), Root('trkseg') ) Select Cast('<gpx creator="Garmin Connect" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/11.xsd" xmlns="http://www.topografix.com/GPX/1/1" xmlns:ns3="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:ns2="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <metadata> <link href="connect.garmin.com"> <text>Garmin Connect</text> </link> <time>' + @startTime + '</time> </metadata> <trk> <name>Seattle Cycling</name> <type>cycling</type>' + @xml + ' </trk> </gpx> ' as xml) Drop Table #Track
0 -
Very cool nerdpoints but remembering to add an extra 10 miles to your wear and tear totals seems a bit easier. like a post it note.1
-
I bet you schedule meetings for late Friday afternoon & ask questions after presentations when everyone else just wants to leave.0
-
I'm a numbers geek as well but even I wouldn't bother about the odd 10 miles here or there!0
-
My thought would be to forget about it. 10 miles means nothing really.
Since you have already done the work though, I would just go with what you did and fugggetabout.0 -
I bet you schedule meetings for late Friday afternoon & ask questions after presentations when everyone else just wants to leave.
Wow, that was hostile for no reason. Having a bad day?
For what it's worth I'm the one trying to sneak out early on Friday. What made you think a person who cares about their own hobbies is the same kind of person who has no hobbies and wants to punish everyone else?
I think this is one of those times you should have thought a little bit before you clicked "post reply."0 -
NorthCascades wrote: »I bet you schedule meetings for late Friday afternoon & ask questions after presentations when everyone else just wants to leave.
Wow, that was hostile for no reason. Having a bad day?
For what it's worth I'm the one trying to sneak out early on Friday. What made you think a person who cares about their own hobbies is the same kind of person who has no hobbies and wants to punish everyone else?
I think this is one of those times you should have thought a little bit before you clicked "post reply."
Was a total joke man. I figured it was so over the top that no one would think I was serious. My apologies.0 -
SQL? Pfft, get back to me when you can do that entire thing in one regex statement1
-
Where are you logging? Can't you just add a manual activity? That's what I do, especially if you know the distance.0
Categories
- All Categories
- 1.4M Health, Wellness and Goals
- 393.3K Introduce Yourself
- 43.8K Getting Started
- 260.2K Health and Weight Loss
- 175.9K Food and Nutrition
- 47.4K Recipes
- 232.5K Fitness and Exercise
- 422 Sleep, Mindfulness and Overall Wellness
- 6.5K Goal: Maintaining Weight
- 8.5K Goal: Gaining Weight and Body Building
- 153K Motivation and Support
- 8K Challenges
- 1.3K Debate Club
- 96.3K Chit-Chat
- 2.5K Fun and Games
- 3.7K MyFitnessPal Information
- 23 News and Announcements
- 1.1K Feature Suggestions and Ideas
- 2.6K MyFitnessPal Tech Support Questions