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:
parent
93670d3026
commit
a0b64b4227
@ -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();
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ private:
|
||||
void gpx();
|
||||
void track();
|
||||
void trackPoints();
|
||||
void tpExtension();
|
||||
void extensions();
|
||||
void trackPointData();
|
||||
void wayPointData();
|
||||
|
Loading…
Reference in New Issue
Block a user