1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Use GPS data as fallback when DEM data not available

This commit is contained in:
Martin Tůma 2019-01-06 18:58:56 +01:00
parent 7a49f01c95
commit 9fc9e24c01

View File

@ -163,6 +163,9 @@ Graph Track::elevation() const
qreal elevation = _dem.elevation(_data.at(i).coordinates()); qreal elevation = _dem.elevation(_data.at(i).coordinates());
if (!std::isnan(elevation)) if (!std::isnan(elevation))
raw.append(GraphPoint(_distance.at(i), _time.at(i), 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()));
} }
} }