Automatic type as virtual if missing GPS track & calories from power

Hi,

A bit of context here, I’ve been enjoying using intervals.icu.

It started for me with tracking some running, I got a Suunto watch which I enjoy and on the basis of the integration with Hammerhead, I got a Karoo 2.

Which is great, and the data flows, so to speak. But for some reasons that they seem to be unwilling to fix, any cycling activity, despite being able to choose in Karoo as being “MTB”, “Road”, “Indoors”, when in the Suunto app, it just shows up as “Cycling”, and it is missing calories. This means I have to slightly tediously correct it.

As autumn and winter creep in, I have been using a smart trainer to do some structured training with the Karoo set to Indoors mode, which disables GPS. This made me wonder, could “Cycling”/“Ride” activities that are lacking a GPS track be automatically marked as “Virtual Ride”?

And given there is is a power track, would it be possible to automatically calculate the calories? At least the “work” field seems to get populated. I’m not sure what method for calories calculation that Hammerhead uses, it seems a bit more advanced than avg power * duration.

Edit: FWIW, the numbers from Karoo in terms of calories to be be: work (kJ) / 4.182 / 0.22, so my last workout of 675kJ came out to: 675 / 4.184 / 0.22 = 733.3127, which is what Karoo says in their dashboard, and this matches the 21-23% efficiency claimed in the intervals.icu UI as well.

Edit 2: this formula works only for the Karoo data, anything from icTrainer seems to come below this number, and the Suunto running activities report a higher calorie count than this, presumably due to different efficiency, which I’d estimate it puts at 23-24%.

I appreciate both of these would be workarounds broken behaviour of the syncing between Hammerhead and Suunto, though the latter could be useful for any other platforms that have power but not report calories.

Thanks for reading.

1 Like

For a very similar task I use ActivityFix for which you can create strava filters that automatically trigger any changes in the workout metadata.

Looks like ActivityFix is only for Strava, which I don’t use. I directly import data from Suunto.

They do get the “trainer” flag set so will use indoor FTP etc. but thats not quite as accessible as changing the type. I can do this but it breaks quite a few of my fit file import tests (Ride → Virtual Ride). Anyone see a problem?

Yes I will do that for cycling anyway. That Karoo formula seems reasonable.

Indoor rides have no gps
Virtual ride has gps (fake)

I suppose if we want to be pedantic/precise & accurate, the Garmin Fit SDK supplies a few cycling sub sport types, and technically an indoor training without GPS should be FIT_SUB_SPORT_INDOOR_CYCLING, but I don’t see an “indoor cycling” activity type that comes with intervals other than Virtual Ride.

#define FIT_SUB_SPORT_SPIN                                                       ((FIT_SUB_SPORT)5) // Cycling
#define FIT_SUB_SPORT_INDOOR_CYCLING                                             ((FIT_SUB_SPORT)6) // Cycling/Fitness Equipment
#define FIT_SUB_SPORT_ROAD                                                       ((FIT_SUB_SPORT)7) // Cycling
#define FIT_SUB_SPORT_MOUNTAIN                                                   ((FIT_SUB_SPORT)8) // Cycling
#define FIT_SUB_SPORT_DOWNHILL                                                   ((FIT_SUB_SPORT)9) // Cycling
#define FIT_SUB_SPORT_RECUMBENT                                                  ((FIT_SUB_SPORT)10) // Cycling
#define FIT_SUB_SPORT_CYCLOCROSS                                                 ((FIT_SUB_SPORT)11) // Cycling
#define FIT_SUB_SPORT_HAND_CYCLING                                               ((FIT_SUB_SPORT)12) // Cycling
#define FIT_SUB_SPORT_TRACK_CYCLING                                              ((FIT_SUB_SPORT)13) // Cycling
#define FIT_SUB_SPORT_BMX                                                        ((FIT_SUB_SPORT)29) // Cycling
#define FIT_SUB_SPORT_GRAVEL_CYCLING                                             ((FIT_SUB_SPORT)46) // Cycling
#define FIT_SUB_SPORT_E_BIKE_MOUNTAIN                                            ((FIT_SUB_SPORT)47) // Cycling
#define FIT_SUB_SPORT_COMMUTING                                                  ((FIT_SUB_SPORT)48) // Cycling
#define FIT_SUB_SPORT_MIXED_SURFACE                                              ((FIT_SUB_SPORT)49) // Cycling
#define FIT_SUB_SPORT_INDOOR_HAND_CYCLING                                        ((FIT_SUB_SPORT)88)

The “virtual ride” type probably matches this mostly?

#define FIT_SUB_SPORT_VIRTUAL_ACTIVITY                                           ((FIT_SUB_SPORT)58)

So in the case of intervals.icu, changing Indoor Rides that has no GPS to Virtual Rides should theoretically not break anything.

This is live now. Hopefully it doesn’t cause problems for anyone.

Perhaps a better filter would be No GPS + No Elevation.

I have a few outdoors activities with No Gps and with Elevation

Ack. Ok I have added a check for that.

@dublet Unfortunately this means your files will not become virtual rides as they have altitude data.

1 Like

Why Hammerhead chooses to log elevation when doing a structured workout is a bit of a mystery to me, especially with the “Disable GPS” setting ticked for Indoor. Hey ho.

Thanks though!

Are those workouts ‘slope’ or ‘resistance’ based iso ‘ERG’?

ERG. The altitude track very much is a “wobble” of a meter here and there probably due to atmospheric pressure change, e.g.

Ah, you are training in your basement under sea-level :joy:
Just joking :wink: . My Garmin isn’t recording an elevation stream when GPS is off. Hammerhead seems to behave differently, which is not necessarily wrong. Indoor training at high elevation could be accounted for this way.

It could be, but my under the sea basement is a conservatory at approx 50 meters above the sea, so it’s incorrect even if I wanted to account for it. It’s not even particularly consistent as in other static workouts it puts my static bike setup at anywhere between -100 :chart_with_downwards_trend: to 160 :chart_with_upwards_trend: meters altitude.

Looking out the window suggests to me that where I live does not move 260 meters up and down. Something is fishy, but it’s not me. :fish: Hammerhead have struggled to get this right, if I follow some other online discourse https://www.reddit.com/r/Karoo/comments/162ubgx/status_false_elevation_data/

2 Likes

Most devices ‘calibrate’ elevation to a known map position at start-up. You could try to start-up your device with GPS on outdoors, and once position is locked, turn off GPS and go indoors to check altitude again.
Barometric pressure alone is not enough to get accurate elevation at a certain spot because it changes with the weather. Elevation changes should be relatively correct but the whole stream can be shifted up/down depending on the starting elevation being right/wrong.

That sounds like work which no doubt will get my HR up but not count towards my training load for the session. :frowning_face: I could be doing my actual workout in this time, so I’ll just live with this.

At least the calories will be set now.

2 Likes

Wonder if “ignore elevation” is useful here. (But this doesn’t yet exist)