I have a list of named routes represented as GPS coordinate lists (not roads, but can be considered similar to roads).
I need a "Map Matching" type algorithm implemented in Android/Java, that I can feed this list of routes AND continuously input recorded GPS coordinates WHILE they are being recorded. Basically I should be able to input one recorded GPS coordinate at a time while recording user location (e.g. as a LatLng or Location object).
As output I need a notification every time a change of route occurs (user moves onto another route). I need to know the time the change occurs, the previous route (if any) and the new route.
The end result is, that I'm able to tell exactly which routes have been traveled, in which order and (approximately) when a route was entered/exited (e.g. user was traveling on route X from 9:42 until 9:57, on route Y from 9:57 until 10:02, etc.).
*) Low battery and memory usage (will be executed locally on a mobile device)
*) Precision (without high precision the algorithm is unusable)
*) Speed (should be able to handle live recording with several recordings per minute)
*) Well written, well structured, readable and maintainable code (e.g. for later small improvements, debugging and bug fixing)
Typical route data:
*) The set of possible routes is typically 50-200 routes
*) A route is typically between 50 meters and 10 km long
*) A route consists of typically between 5 and 100 GPS coordinates
*) Routes can be considered similar to (one-way) roads
Typical input data:
*) Consists of typically between 5.000 and 20.000 recorded GPS coordinates, but can be both less or more
*) Record time is typically between 1 and 7 hours, but can be both less or more
*) A recording can have sudden location changes during the recording, as the recording can be paused at one location and resumed at another completely different location
The algorithm/code can make use of third party Open Source libraries if wanted. Several Map Matching algorithms seems to exist, which might be a shortcut to a final result.