From 9fe930dca58e2c6c9a9999dfbd484b35d1e3fd09 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Fri, 26 Dec 2014 09:22:52 +0000 Subject: [PATCH] Support Magellan GPX extensions .. using the GPX format they add extensions to record power, heartrate and cadence using element names power, heartrate and cadence ! (way to simple!) .. thanks to Wenqi Zhang for the sample. --- src/GpxParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GpxParser.cpp b/src/GpxParser.cpp index ec95bb956..f006ef6d2 100644 --- a/src/GpxParser.cpp +++ b/src/GpxParser.cpp @@ -123,7 +123,7 @@ bool { alt = buffer.toDouble(); // metric } - else if (qName == "gpxtpx:hr") + else if (qName == "gpxtpx:hr" || qName == "heartrate") { hr = buffer.toInt(); } @@ -135,7 +135,7 @@ bool { temp = buffer.toDouble(); } - else if ((qName == "gpxdata:cadence") || (qName == "gpxtpx:cad")) + else if ((qName == "gpxdata:cadence") || (qName == "gpxtpx:cad") || qName == "cadence") { cad = buffer.toDouble(); }