Skip to content

Commit

Permalink
Use split-time in HRM [IntTimes] section (#20)
Browse files Browse the repository at this point in the history
This is an example where the HRM2 v1.4 documentation is ambiguous.
However, AR67 (from the Polar forums) tells me that these are meant to
be "split times", which appears to mean that they time-stamp the point
at which the lap was "taken".

The protobuf laps data includes a "split-time" field that appears to
match with what AR67 reports, so let's go with that for now :)

See http://forum.polar.fi/showthread.php?p=85839#post85839 for details.
  • Loading branch information
pcolby committed Aug 4, 2014
1 parent f3dd3a0 commit d758fce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/polar/v2/trainingsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ QStringList TrainingSession::toHRM()
const QVariantMap stats = firstMap(lap.toMap().value(QLatin1String("stats")));
const QVariantMap hrStats = firstMap(stats.value(QLatin1String("heartrate")));
// Row 1
stream << getDurationString(firstMap(header.value(QLatin1String("duration"))));
stream << getDurationString(firstMap(header.value(QLatin1String("split-time"))));
stream << '\t' << first(hrStats.value(QLatin1String("average"))).toUInt();
stream << '\t' << first(hrStats.value(QLatin1String("minimum"))).toUInt();
stream << '\t' << first(hrStats.value(QLatin1String("average"))).toUInt();
Expand Down
8 changes: 4 additions & 4 deletions test/polar/v2/testdata/training-sessions-19401412.hrm
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ Exported by test 1.2.3.4
0 0 0 28 29
0 2942 0 0 0 0
0 0 0 0 0 0
00:24:52.250 165 143 165 178
00:54:56.125 165 143 165 178
0 0 0 0 0 0
0 0 0 25 20
0 2034 0 0 0 0
0 0 0 0 0 0
00:03:47.500 144 135 144 151
00:58:43.625 144 135 144 151
0 0 0 0 0 0
0 0 0 0 5
0 530 0 0 0 0
0 0 0 0 0 0
00:26:01.625 172 150 172 181
01:24:45.250 172 150 172 181
0 0 0 0 0 0
0 0 0 24 26
0 2595 0 0 0 0
0 0 0 0 0 0
00:02:33.500 158 150 158 169
01:27:18.750 158 150 158 169
0 0 0 0 0 0
0 0 0 0 4
0 384 0 0 0 0
Expand Down

0 comments on commit d758fce

Please sign in to comment.