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

FEATURE: Split Timing #2

Open
TheAngryRaven opened this issue May 24, 2023 · 0 comments
Open

FEATURE: Split Timing #2

TheAngryRaven opened this issue May 24, 2023 · 0 comments
Labels
feature New feature to be created Library Work for the public library

Comments

@TheAngryRaven
Copy link
Owner

TheAngryRaven commented May 24, 2023

Problem

Currently only has the ability to monitor a single "start stop" line

Description

It would be much nicer if we could actually have the ability to monitor lap split times so that we can notify the driver when they have completed a "purple" sector, or display an "optimal time"

Proposed Solution

void addSplitLine(double pointALat, double pointALng, double pointBLat, double pointBLng);
int getSectorCount();
unsigned long getSectorBestTime(int sectorNumber);
unsigned long getSectorPaceDifference(int sectorNumber);
unsigned long getSectorPaceDifference(int sectorNumber);
unsigned long getOptimalLapTime();

This will probably require great re-work to ::loop and ::checkStartFinish, this code isn't exactly portable in its current state, and the original intention for the loop was not a great one.

It would probably make better sense to do something like:

  1. check last line passed
  2. save current sector to variable
  3. Using current sector information, prepare looking for NEXT LINE ONLY
    a. Or the start-line if race not started

It would be the responsibility of the consuming application to alert the driver on a purple sector.

Concerns

The actual hard part is going to be figuring out a way to manage the individual split stats (odometer/time/etc) for calculations.
The way we are currently handling the start-finish times alone is a bit gross.

@TheAngryRaven TheAngryRaven added enhancement New feature or request Library Work for the public library labels May 24, 2023
@TheAngryRaven TheAngryRaven changed the title Need ability to preform split timing Add split timing functionality May 24, 2023
@TheAngryRaven TheAngryRaven changed the title Add split timing functionality FEATURE: Split Timing May 24, 2023
@TheAngryRaven TheAngryRaven added feature New feature to be created and removed enhancement New feature or request labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to be created Library Work for the public library
Projects
None yet
Development

No branches or pull requests

1 participant