0

I have a GPS trails that I recorded and I want to use that route in HERE turn-by-turn navigation. Is there any way I can load the GPS points and pass it to the route engine and used in TBT mode.

Any recommendation? Thank you in advance.

neilQ5
  • 179
  • 1
  • 12

1 Answers1

1

Unfortunately, it is not directly supported at the moment. What you could try is to use PositionSimulator to load your GPX or NMEA file and then use int getPositionCount() and GeoPosition getPosition(int index) to get the GeoCoordiante for the points in the file. Then you could calculate a Route from the RoutePlan to use with NavigationManager.

You would want to keep the number of waypoints reasonable (~50 waypoints or less), otherwise, performance will not be the best, so you would have to implement some simplification of the trace. Maybe there are open source libraries available which can convert and simplify NMEA of GPX to GeoCoordinates for you...

FYI, if you do have a GPX or NMEA trace, you can also simulate playback of the trace using PositionSimulator, but this is not exactly what you want. Also, if you do happen to generate the Route from your trace, you can save it for future use using the Route#serialize() API.

AndrewJC
  • 1,318
  • 12
  • 11
  • For line simplification you can try this algorithm: https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm – AndrewJC Apr 25 '17 at 23:19
  • 1
    Sorry for late reply. I put the modification on hold for now since the SDK is not supporting it. But thank you for suggesting other functionalities like the PositionSimulator it's a big help for some mock-up location testing. – neilQ5 May 04 '17 at 20:21
  • @AndrewJC what if I want to navigate along the custom route without compromising on the number of coordinates? There has to be something that can be done? – gameOne Jul 25 '17 at 12:38
  • @gameOne Unfortunately you have to create a `RoutePlan` and calculate a `Route` using it before it can be used for navigation. Therefore you are limited by what you are able to make the `CoreRouter` return within a reasonable performance profile. – AndrewJC Jul 25 '17 at 20:56
  • @AndrewJC What if I navigate part of the routes? – gameOne Jul 26 '17 at 01:28
  • Part of the routes at a time? – gameOne Jul 26 '17 at 02:06