handle files with uniform timestamps
This commit is contained in:
parent
52984d4b70
commit
7831774703
1 changed files with 2 additions and 0 deletions
|
@ -2074,6 +2074,8 @@ function withArtificialTimestamps(
|
|||
function getTimestamp(a: TrackPoint, b: TrackPoint, speed: number): Date {
|
||||
if (a.time === undefined) {
|
||||
return undefined;
|
||||
} else if (speed === undefined) {
|
||||
return new Date(a.time.getTime() + 1000);
|
||||
}
|
||||
let dist = distance(a.getCoordinates(), b.getCoordinates()) / 1000;
|
||||
return new Date(a.time.getTime() + (1000 * 3600 * dist) / speed);
|
||||
|
|
Loading…
Reference in a new issue