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

Improved train detection "algorithm" #24

Open
wissehes opened this issue Oct 4, 2023 · 2 comments
Open

Improved train detection "algorithm" #24

wissehes opened this issue Oct 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request future An issue for a future release

Comments

@wissehes
Copy link
Owner

wissehes commented Oct 4, 2023

Improve the train detection.

  • Compare the heading of the train with the heading of the user's device (maybe).
  • Comparing the distance between the user and the train, to avoid showing a train that's >500m away as the current train.
  • We can also compare the speed of the user with the speed of the train, for example to avoid showing a stopped sprinter as the current train, when we're actually in an intercity.

In this order:

  1. Rank trains by distance.
  2. Take the first 5 trains.
  3. Make sure the first 5 trains are a maximum of 1km from the user.
  4. Now sort by how close the trains speed is to the user's speed. So the first item in the list most closely matches that of the user.

And also adding a button for the user to understand why there's no train detected.

@wissehes wissehes added the enhancement New feature or request label Oct 4, 2023
@wissehes wissehes self-assigned this Oct 4, 2023
@wissehes wissehes added the future An issue for a future release label Oct 4, 2023
@wissehes
Copy link
Owner Author

wissehes commented Oct 4, 2023

A good first start would be to actually check whether the most close by train is actually nearby (<500m distance).

@wissehes
Copy link
Owner Author

wissehes commented Oct 5, 2023

Added checking distance in 4a3226b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future An issue for a future release
Projects
None yet
Development

No branches or pull requests

1 participant