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

Fuel consumption calculations seem off #16

Open
austinbaccus opened this issue Aug 29, 2021 · 0 comments
Open

Fuel consumption calculations seem off #16

austinbaccus opened this issue Aug 29, 2021 · 0 comments
Assignees
Labels
bug Something isn't working fuel management

Comments

@austinbaccus
Copy link
Owner

After ending an old race and starting a new race, the MPG number will show an MPG in the thousands.

This is probably because the app doesn't know that we are on a new track, and as far as it knows the car travelled several hundred meters in an instant.

This, in turn, is because the car will "travel" from the ending coordinates of the last race to the starting coordinates of the current race instantaneously.

For instance, I could end a race in the middle of a lap on the Nurbringring (and have the coordinates [-1000, 0, 500]) and start a new race on Laguna Seca (and have the new coordinates [0,0,0]). To the program, the car has travelled ~1118 meters in a single tick. This is what's causing the MPG to shoot up into the thousands during the start of a new race.

I would suggest implementing an auto-reset feature triggered by the start of a new race, which in turn is triggered when the lap counter does anything but increment itself by 1.

@austinbaccus austinbaccus added bug Something isn't working fuel management labels Aug 29, 2021
@austinbaccus austinbaccus self-assigned this Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuel management
Projects
None yet
Development

No branches or pull requests

1 participant