mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +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()));
|
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()
|
void Parser::extensions()
|
||||||
{
|
{
|
||||||
while (_reader.readNextStartElement()) {
|
while (_reader.readNextStartElement()) {
|
||||||
if (_reader.name() == "speed" || _reader.name() == "hr"
|
if (_reader.name() == "speed" || _reader.name() == "hr"
|
||||||
|| _reader.name() == "heartrate")
|
|| _reader.name() == "heartrate")
|
||||||
handleExtensionData(_reader.name(), _reader.readElementText());
|
handleExtensionData(_reader.name(), _reader.readElementText());
|
||||||
|
else if (_reader.name() == "TrackPointExtension")
|
||||||
|
tpExtension();
|
||||||
else
|
else
|
||||||
_reader.skipCurrentElement();
|
_reader.skipCurrentElement();
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ private:
|
|||||||
void gpx();
|
void gpx();
|
||||||
void track();
|
void track();
|
||||||
void trackPoints();
|
void trackPoints();
|
||||||
|
void tpExtension();
|
||||||
void extensions();
|
void extensions();
|
||||||
void trackPointData();
|
void trackPointData();
|
||||||
void wayPointData();
|
void wayPointData();
|
||||||
|
Loading…
Reference in New Issue
Block a user