Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nostradamus #142

Merged
merged 25 commits into from
Apr 23, 2024
Merged

Nostradamus #142

merged 25 commits into from
Apr 23, 2024

Conversation

Topvennie
Copy link
Member

@Topvennie Topvennie commented Apr 20, 2024

New positioner (rebased on station-ws-conn)

Features:

  • Supports switchovers
  • Supports teams taking a break
  • Is dialed in after about 2-3 laps
  • No jumps

Requires a restart:

  • New teams
  • New stations

Todo (at a later stage):

  • Smoothen out the speed when a new station is reached

@Topvennie Topvennie added the logic Everything relating to the lap-counting logic label Apr 20, 2024
@Topvennie Topvennie requested review from NuttyShrimp and FKD13 April 20, 2024 18:38
@Topvennie Topvennie self-assigned this Apr 20, 2024
public class Nostradamus implements Positioner {
private static final Logger logger = Logger.getLogger(Nostradamus.class.getName());
private final int INTERVAL_CALCULATE_MS = 500; // How often to handle new detections (in milliseconds)
private final int INTERVAL_FETCH_MS = 60000; // Interval between fetching baton switchovers (in milliseconds)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ik denk dat dit wel vaker mag gebeuren? of zorgt dat ergens voor problemen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorten the interval 27d1dc4

private final int INTERVAL_FETCH_MS = 60000; // Interval between fetching baton switchovers (in milliseconds)
private final int INTERVAL_DETECTIONS_MS = 3000; // Amount of milliseconds to group detections by
private final int MAX_NO_DATA_MS = 30000; // Send a stationary position after receiving no station update for x amount of milliseconds
private final int AVERAGE_AMOUNT = 10; // Calculate the median running speed of the last x intervals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

median or average?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the only reference left to average. All the 10 other references say median so it's median but changed it anyway 877fe72

@Topvennie Topvennie changed the base branch from development to station-ws-conn April 21, 2024 17:28
Base automatically changed from station-ws-conn to development April 22, 2024 17:35
@Topvennie Topvennie merged commit 8ea00ea into development Apr 23, 2024
1 check passed
@Topvennie Topvennie deleted the nostradamus branch April 23, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logic Everything relating to the lap-counting logic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants