From 259c6daff53d3570e1cafd3e619ffd549ebacd0b Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 12 Feb 2012 09:58:32 +0100 Subject: [PATCH] Correct intialisation of altitude for TCX without altitude Fixes #647. --- src/TcxParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TcxParser.cpp b/src/TcxParser.cpp index 077002ce4..a76025367 100644 --- a/src/TcxParser.cpp +++ b/src/TcxParser.cpp @@ -32,6 +32,9 @@ TcxParser::TcxParser (RideFile* rideFile, QList *rides) : rideFile(ri GarminHWM = appsettings->value(NULL, GC_GARMIN_HWMARK); if (GarminHWM.isNull() || GarminHWM.toInt() == 0) GarminHWM.setValue(25); // default to 25 seconds. first = true; + + // First initialisation for altitude (not initialised for each point) + alt= 0; } bool @@ -78,7 +81,7 @@ TcxParser::startElement( const QString&, const QString&, const QString& qName, c lat = 0.0; lon = 0.0; badgps = false; - //alt = 0.0; // TCS from FIT files have not alt point for each trackpoint + //alt = 0.0; // TCX from FIT files have not alt point for each trackpoint distance = -1; // nh - we set this to -1 so we can detect if there was a distance in the trackpoint. secs = 0;