From b5cb3d5b2dcdfce9450eebb3746c9798f9c35a8c Mon Sep 17 00:00:00 2001 From: Topvennie Date: Tue, 23 Apr 2024 16:33:55 +0200 Subject: [PATCH] only send the standing still position once every interval --- .../java/telraam/logic/positioner/nostradamus/Nostradamus.java | 1 + .../java/telraam/logic/positioner/nostradamus/TeamData.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/telraam/logic/positioner/nostradamus/Nostradamus.java b/src/main/java/telraam/logic/positioner/nostradamus/Nostradamus.java index 558ac38..825d250 100644 --- a/src/main/java/telraam/logic/positioner/nostradamus/Nostradamus.java +++ b/src/main/java/telraam/logic/positioner/nostradamus/Nostradamus.java @@ -131,6 +131,7 @@ private void calculatePosition() { entry.getValue().getPosition().getProgress() )) ); + entry.getValue().setPreviousStationArrival(entry.getValue().getPreviousStationArrival() + MAX_NO_DATA_MS); } } diff --git a/src/main/java/telraam/logic/positioner/nostradamus/TeamData.java b/src/main/java/telraam/logic/positioner/nostradamus/TeamData.java index 6fba92d..c34a016 100644 --- a/src/main/java/telraam/logic/positioner/nostradamus/TeamData.java +++ b/src/main/java/telraam/logic/positioner/nostradamus/TeamData.java @@ -1,6 +1,7 @@ package telraam.logic.positioner.nostradamus; import lombok.Getter; +import lombok.Setter; import telraam.database.models.Detection; import telraam.database.models.Station; import telraam.logic.positioner.Position; @@ -13,7 +14,7 @@ public class TeamData { private final Map stations; // Station list private StationData currentStation; // Current station location private StationData previousStation; // Previous station location - @Getter + @Getter @Setter private long previousStationArrival; // Arrival time of previous station. Used to calculate the average times private final int totalDistance; // Total distance of the track private final float maxDeviance; // Maximum deviance the animation can have from the reality