mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-17 16:42:28 +00:00
time management improvements for routing tool
This commit is contained in:
1 parent
61c6a29d64
commit
d7c756e471
2 files changed
+5
-1
No files matched your search
@@ -569,6 +569,10 @@ export class RoutingControls {
|
||||
let remainingTime = stats.global.time.moving - (stats.local.time.moving[anchors[anchors.length - 1].point._data.index] - stats.local.time.moving[anchors[0].point._data.index]);
|
||||
let replacingTime = newTime - remainingTime;
|
||||
|
||||
if (replacingTime <= 0) { // Fallback to simple time difference
|
||||
replacingTime = stats.local.time.total[anchors[anchors.length - 1].point._data.index] - stats.local.time.total[anchors[0].point._data.index];
|
||||
}
|
||||
|
||||
speed = replacingDistance / replacingTime * 3600;
|
||||
|
||||
if (startTime === undefined) { // Replacing the first point
|
||||
|
||||
Reference in new issue
Block a user