mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Improved handling of track data with time skews
This commit is contained in:
parent
3a046af6b6
commit
255f4ca63c
@ -99,8 +99,11 @@ Track::Track(const TrackData &data) : _data(data), _pause(0)
|
|||||||
if (sd.at(j).timestamp() >= sd.at(j-1).timestamp())
|
if (sd.at(j).timestamp() >= sd.at(j-1).timestamp())
|
||||||
dt = sd.at(j-1).timestamp().msecsTo(
|
dt = sd.at(j-1).timestamp().msecsTo(
|
||||||
sd.at(j).timestamp()) / 1000.0;
|
sd.at(j).timestamp()) / 1000.0;
|
||||||
else
|
else {
|
||||||
dt = NAN;
|
qWarning("%s: %s: time skew detected", qPrintable(_data.name()),
|
||||||
|
qPrintable(sd.at(j).timestamp().toString(Qt::ISODate)));
|
||||||
|
dt = 0;
|
||||||
|
}
|
||||||
seg.time.append(seg.time.last() + dt);
|
seg.time.append(seg.time.last() + dt);
|
||||||
|
|
||||||
if (dt < 1e-3) {
|
if (dt < 1e-3) {
|
||||||
|
Loading…
Reference in New Issue
Block a user