1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Added support for Garmin "TrackPointExtension" extension (heart rate)

This commit is contained in:
Martin Tůma 2016-03-21 23:13:46 +01:00
parent 93670d3026
commit a0b64b4227
2 changed files with 13 additions and 0 deletions

View File

@ -39,12 +39,24 @@ void Parser::handleWayPointAttributes(const QXmlStreamAttributes &attr)
attr.value("lat").toLatin1().toDouble()));
}
void Parser::tpExtension()
{
while (_reader.readNextStartElement()) {
if (_reader.name() == "hr")
handleExtensionData(_reader.name(), _reader.readElementText());
else
_reader.skipCurrentElement();
}
}
void Parser::extensions()
{
while (_reader.readNextStartElement()) {
if (_reader.name() == "speed" || _reader.name() == "hr"
|| _reader.name() == "heartrate")
handleExtensionData(_reader.name(), _reader.readElementText());
else if (_reader.name() == "TrackPointExtension")
tpExtension();
else
_reader.skipCurrentElement();
}

View File

@ -22,6 +22,7 @@ private:
void gpx();
void track();
void trackPoints();
void tpExtension();
void extensions();
void trackPointData();
void wayPointData();