Based on GraphHopper and a OSM graph, I’d like to determine if my car is moving in the same traffic direction compared to another vehicle in motion.
That means I need to determine if :
- the other car is on the same road direction as me, but behind me --> the other car will catch me
- the other car is on the same road direction as me, but ahead --> I will catch the other car
- the other car is on the opposite direction (on the same road) and ahead of me --> I will meet the other car
Would you have some ideas to get that?
(Maybe use the history of edges that are crossed by me and the other car? But that does not look easy if I want to detect a potential collision between cars with 10 minutes in advance…)