Skip to content

Commit

Permalink
only send the standing still position once every interval
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed Apr 23, 2024
1 parent 8ea00ea commit b5cb3d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ private void calculatePosition() {
entry.getValue().getPosition().getProgress()
))
);
entry.getValue().setPreviousStationArrival(entry.getValue().getPreviousStationArrival() + MAX_NO_DATA_MS);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -13,7 +14,7 @@ public class TeamData {
private final Map<Integer, StationData> 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
Expand Down

0 comments on commit b5cb3d5

Please sign in to comment.