From 9fc9e24c0177c0ab43b16250fa57372c1af186df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 6 Jan 2019 18:58:56 +0100 Subject: [PATCH] Use GPS data as fallback when DEM data not available --- src/data/track.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/track.cpp b/src/data/track.cpp index 969b6eec..2374ae04 100644 --- a/src/data/track.cpp +++ b/src/data/track.cpp @@ -163,6 +163,9 @@ Graph Track::elevation() const qreal elevation = _dem.elevation(_data.at(i).coordinates()); if (!std::isnan(elevation)) raw.append(GraphPoint(_distance.at(i), _time.at(i), elevation)); + else if (_data.at(i).hasElevation()) + raw.append(GraphPoint(_distance.at(i), _time.at(i), + _data.at(i).elevation())); } }