Watcher of videos wrote:
4 5 6 yellow wrote:I don't understand why he should supply cadence data, that holds only for cycling, or I miss something?
At a basic level, it will show a cadence of 160-180 for a run, and approximately 0 for a ride in the RV.
With a bit more processing, it's also possible to see whether the cadence matches the running terrain, i.e. up/downhill, road vs trail ( just in case Rob is planning to paste a steady 180 cadence into his GPX files - it's not that easy to fake ).
That would be particularly stupid even for him since TomTom doesn't insert running cadence data into a GPX file. This is a sample data point from one such file:
62.4
2016-07-09T05:56:18.000Z
121
There is some code on github which includes ttbin to gpx exporting, I was having a go at porting it but based on a code read it does the same thing
void export_gpx(TTBIN_FILE *ttbin, FILE *file)
{
char timestr[32];
TTBIN_RECORD *record;
int heart_rate;
if (!ttbin->gps_records.count)
return;
fputs("\r\n"
"\r\n"
" \r\n ", file);
fputs(create_filename(ttbin, "gpx"), file);
fputs("\r\n \r\n"
" \r\n ", file);
switch(ttbin->activity)
{
case ACTIVITY_RUNNING: fputs("RUNNING", file); break;
case ACTIVITY_CYCLING: fputs("CYCLING", file); break;
case ACTIVITY_SWIMMING: fputs("POOL SWIM", file); break;
case ACTIVITY_TREADMILL: fputs("TREADMILL", file); break;
case ACTIVITY_FREESTYLE: fputs("FREESTYLE", file); break;
default: fputs("UNKNOWN", file); break;
}
fputs("\r\n \r\n", file);
heart_rate = 0;
for (record = ttbin->first; record; record = record->next)
{
switch (record->tag)
{
case TAG_GPS:
/* this will happen if the GPS signal is lost or the activity is paused */
if ((record->gps.timestamp == 0) || ((record->gps.latitude == 0) && (record->gps.longitude == 0)))
continue;
strftime(timestr, sizeof(timestr), "%FT%X.000Z", gmtime(&record->gps.timestamp));
fprintf(file, " \r\n",
record->gps.longitude, record->gps.latitude);
if (!isnan(record->gps.elevation))
fprintf(file, " %d\r\n", (int)record->gps.elevation);
fputs( " ", file);
fputs(timestr, file);
fputs("\r\n", file);
if (heart_rate > 0)
{
fputs(" \r\n"
" \r\n", file);
fprintf(file, " %d\r\n", heart_rate);
fputs(" \r\n"
" \r\n", file);
}
fputs( " \r\n", file);
break;
case TAG_HEART_RATE:
heart_rate = record->heart_rate.heart_rate;
break;
}
}
fputs(" \r\n \r\n\r\n", file);
}