3

I'm in the process of creating a offline GPS navigation application using Graphhopper-offline, OpenStreetMap data and GPS coordinates read every second from a android device.

So far I have managed to read in the GPS coordinates, get route instructions from graphhopper and update my position on a map. But when I test with real data there are large number of points which are not actually on the route and due that I am getting incorrect routing instructions from graphhopper.

To eliminate this I tried using a Kalman filtering approach given as a answer to the stackoverflow question

But still I get a considerable number of wrong results. I cannot post my exact code since this is for a product. My approach is,

1. Get user to set the destination  
2. Read initial position from GPS data
3. Get start-to-destination instructions from graphhopper
4. Display instruction
5. Read GPS position every second. Set current position as start
6. Repeat steps 3,4 until he reaches the destination.

In order to smoothen the path I'am getting Kalman predicted value for each GPS postion read. But I am getting inaccurate points more than acceptable.

I will be really thankful if you can help me with this by pointing out what I am doing wrong or a way to get this fixed. I am not asking for code, at least point in the correct direction will help me a lot.

Community
  • 1
  • 1
Isuru Pathirana
  • 1,060
  • 1
  • 16
  • 37
  • I think that is called 'online map matching'. You could try our (offline) map matching component to guess the correct road. Here is the latest PR which has hidden markov model instead of a simple heuristic integrated: https://github.com/graphhopper/map-matching/pull/49 – Karussell May 31 '16 at 18:14
  • @Karussell Yes I think that's the correct phrase for that. I'll give offline map matching a try. But it is essential that I do this real time or find a way to smoothen or filter out incorrect results. So far no good. – Isuru Pathirana Jun 01 '16 at 05:42
  • 1
    Our matcher is fast and can be done in real time, just have a try and let us know :) – Karussell Jun 01 '16 at 06:23
  • @Karussell I tried to build from maven as given in your link. But it's not creating the `map-matching-*-dependencies.jar` inside `matching-core/target/`. I think it's something to do with the `pom.xml`. I see you have used maven-assembly plugin in pom of matching-core. But I don't think it's working. Do I have to add a goal to it or something? – Isuru Pathirana Jun 01 '16 at 08:44
  • Please have a look into `matching-web/target/` and did you call `mvn clean install -DskipTests=true`? Or just wait 2 weeks - I'll merge this into master soon and make it a lot easier to consume&start. Also we should move to our forum for this I guess: https://discuss.graphhopper.com/c/graphhopper/map-matching As discussion is easier there. – Karussell Jun 01 '16 at 08:51
  • @IsuruPathirana have you find any solution for your problem? – Aman Jain Apr 25 '18 at 08:07

0 Answers0