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

Simulate acceleration #14

Open
findus opened this issue Sep 14, 2020 · 1 comment
Open

Simulate acceleration #14

findus opened this issue Sep 14, 2020 · 1 comment

Comments

@findus
Copy link
Owner

findus commented Sep 14, 2020

Right now train acceleration after stops is not simulated, implement this to get a little more accurate positions.

Basic functionality currently looks like this:
The Logic uses 3 Curves to determine the current location of the train after x seconds (y axis = meters, x axis = time).
The first curves tries to mimic a smooth acceleration, the second one driving with constant speed, and the third one braking before the next stop.

The pink curve indicates the "linear" movement that the app displays right now.

grafik

Right now the app implements 2 seperate curves for longer and shorter trips, because with a slower acceleration on short trips the first and third curve overlap with each other, which creates ugly teleporting effects as soon as the function calculates the distance based on the linear curve.

This is still a pretty basic approach, still needs some checking if it is suitable.

@findus
Copy link
Owner Author

findus commented Sep 25, 2020

#17 nearly done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant