Got a big issue that I cant get it right in my head. Tried to read lot's of articles on net, but just culdn't make all pieces together to one clear image what to do.
I have following data:
Locations of bus stations (route is known) in latitude/longitude value pairs.
Location of current station - place where I stand.
GPS data for all vehicles that are operating on this route in GPRMC format: e.g. "$GPRMC,122532.000,A,4533.2553,N,01842.6141,E,28.18,92.86,220113,,,D*66;"
Now the hard part :) - at least for me, what would be logic to find out from GPS data which vehicle will come first to my current location.
My logic was first to get nearest vehicle, but then I realised that it can be vehicle that just passed my location. And this made me sad a lot :)
If someone have piece of code - any language :) it would be great, but also if someone can explain me - or point me to some good article I would be really grateful. I didn't work before with this information so it makes me really confused to get whole picture how it is supposed to work.