mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-16 11:37:46 +01:00
Properly parse TCX trackpoint extensions
This commit is contained in:
parent
03e7d092c4
commit
0e026d6a96
@ -66,13 +66,25 @@ void TCXParser::heartRateBpm(Trackpoint &trackpoint)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCXParser::extensions(Trackpoint &trackpoint)
|
void TCXParser::TPX(Trackpoint &trackpoint)
|
||||||
{
|
{
|
||||||
while (_reader.readNextStartElement()) {
|
while (_reader.readNextStartElement()) {
|
||||||
if (_reader.name() == QLatin1String("RunCadence"))
|
if (_reader.name() == QLatin1String("RunCadence"))
|
||||||
trackpoint.setCadence(number());
|
trackpoint.setCadence(number());
|
||||||
else if (_reader.name() == QLatin1String("Watts"))
|
else if (_reader.name() == QLatin1String("Watts"))
|
||||||
trackpoint.setPower(number());
|
trackpoint.setPower(number());
|
||||||
|
else if (_reader.name() == QLatin1String("Speed"))
|
||||||
|
trackpoint.setSpeed(number());
|
||||||
|
else
|
||||||
|
_reader.skipCurrentElement();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TCXParser::extensions(Trackpoint &trackpoint)
|
||||||
|
{
|
||||||
|
while (_reader.readNextStartElement()) {
|
||||||
|
if (_reader.name() == QLatin1String("TPX"))
|
||||||
|
TPX(trackpoint);
|
||||||
else
|
else
|
||||||
_reader.skipCurrentElement();
|
_reader.skipCurrentElement();
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ private:
|
|||||||
void trackpointData(Trackpoint &trackpoint);
|
void trackpointData(Trackpoint &trackpoint);
|
||||||
void waypointData(Waypoint &waypoint);
|
void waypointData(Waypoint &waypoint);
|
||||||
void extensions(Trackpoint &trackpoint);
|
void extensions(Trackpoint &trackpoint);
|
||||||
|
void TPX(Trackpoint &trackpoint);
|
||||||
void heartRateBpm(Trackpoint &trackpoint);
|
void heartRateBpm(Trackpoint &trackpoint);
|
||||||
Coordinates position();
|
Coordinates position();
|
||||||
qreal number();
|
qreal number();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user