calculating route is acting strange

172 views
Skip to first unread message

Peer

unread,
Jul 1, 2019, 7:43:39 AM7/1/19
to Osmand
I created a track with waypoints on MyRouteApp.com and saved it to the tracks directory of OsmAnd.
I choosed the track for navigating with the option 'Calculate route between Points'.

At first the navigating was fine. After approximately one hour OsmAnd was starting to act strange when it should recalculate a route. The recalculated as not logical.
example 1:
I should take a turn right into a side street. But OsmAnd wants me to go straight ahead, make a u-turn on a roundabout 200 meters further and then make a left turn into the side straat. 
example 2: I have to drive straight ahead. But Osmand wants me to turn right into a side street, make a uturn after 100meters and then turn right again to follow the orginal route.

This happened several times, always when recalculating a route. I do not know if this is problem in OsmAnd (version 3.3.8) or that my phone (Samsung trend, 6 years old) is just not strong enough for performing this calculations.

Peer

unread,
Jul 3, 2019, 8:14:18 AM7/3/19
to Osmand
I navigated the route again but now I used my Motorola E4plus and OsmNAd version 3.40. The settings were the same as last time.

The number of problems was less then with my old phone.

When I started navigating along the track with the option 'Calculate Route between Points'.
I noticed that route points were not announced (I like that). But after the first time that OsmAnd needs to recalculate the route OsmAnd starts announcing the route points (and it should not!).
when I deliberately made a detour I noticed that at the moment I got back on the track OsmAnd wants me to follow the track in the wrong direction and then make a uturn.
After that I experienced more strange behaviour.
- In stead of just following the road OsmAnd wants me to go on to a parkingpark beside the road and then go back to the road and continu.
- In stead of just following the road OsmAnd wants me to go on to a private  property beside the road and then go back to the road and continu.
- In stead of just following the road OsmAnd wants me to trun left, make a uturn and then go back to the road and continu.

These are some problems I experienced with navigating along a track wit a calculated route between points.
I know that the option 'Calculate route between points' is a relative new option. And it is functioning fine at start. But recalculating the route needs some work. I hope this will improve further in the future.



Op maandag 1 juli 2019 13:43:39 UTC+2 schreef Peer:

Peer

unread,
Jul 5, 2019, 9:34:26 AM7/5/19
to Osmand
Today I imported a track (from myrouteapp.com. This track has a length of 410 km and contains 53 routepoints. I choose this track for navigation with the option 'calculate route between points'.

I took my motorola e4plus more then two whole minutes to calculate the route. 

The starting point  of the route was by my house.  After the start OsmAnd let me four time take a right turn  and then I am back at my home again. Then OsmAnd continues with the route. The option 'calculate route til first and last point' is disabled. It looks as if OsmAnd recognises the first point after it is passed so it wil find the shortest route to this point and therefore creates the loop.
The calculated route is almost the same as the track. There are a few points where the route is different from the track. I tried some navigation option in OsmAnd but I always got the same result. So I think this has something to do with the map.

I will not navigate this route. I allready noticed that recalculating can give strange behaviour on shorter  tracks (100km). Therefor I can expect problems with this 400km track.

I like the feature 'Calculate the route between points' very much but at this moment I think that the route calculation should be improved. I hope to see an improved version in a coming version of OsmAnd.

Op maandag 1 juli 2019 13:43:39 UTC+2 schreef Peer:
I created a track with waypoints on MyRouteApp.com and saved it to the tracks directory of OsmAnd.

P Wat

unread,
Jul 5, 2019, 5:40:26 PM7/5/19
to Osmand
Have you considered letting Osmand calculate the route?  (Instead of creating in on other software).
Paul W

Peer

unread,
Jul 6, 2019, 2:03:40 AM7/6/19
to Osmand
I have seen the videos of Bart Eisenberg (very good!!) but I have not tried to let OsmAnd create the route.
When I look at the route that OsmAnd calculated from the track with routepoint there are only a few minor differences. So the calculated route must be ok.
I noticed that both the short (100 km) and long (400) route contained one uturn

The problems arise when I leave the track during driving. Then OsmAnd starts to recalculate the route.
I do not know how OsmAnd (re)calculates the route. But there is where the strange behaviour starts.
I think OsmAnd does the following:
1. it notices that I am off the track.
2. it chooses the closest reachable routepoint.
3. It calculates a new route to the endpoint thats passes the choosen routepoint.

Op vrijdag 5 juli 2019 23:40:26 UTC+2 schreef P Wat:
Have you considered letting Osmand calculate the route?  (Instead of creating in on other software).thik

Peer

unread,
Jul 6, 2019, 5:16:02 AM7/6/19
to Osmand
I attached a screenshot of a part of a route/track with a problem. I also attached the gpx-file.
In the screenshot I added some numbers in red. I use this numbers for explaining the problems.

* The track follows the numbers:  1-2-3-4-5

* The calculated route does: 1-2-5-4-3.4-5
De calculated route is different from the track. I think the road between 2-3-4 has a lower priority then 2-5-4.
Point 3 is a routepoint in the gpx-file. OsmAnd created a uturn on this point.

* The driven route is : 1-2-3-4-5 (I did not create a screenhot during driving)
In point 2 I decided tot follow the track in stead of the calculated route. When I arrive at the routepoint  (3) a new route was recalculated. It guided me to point 5 in the correct way.
But in point 5 OsmAnd wants me to turn right towards point 2 in stead of following the road. Then it wants me to make a uturn and turn right again in point 5 to get on the correct route. This is an example of the strange behaviour of OsmAnd.



Dwingelo 105.gpx
Screenshot_OsmAnd340WithNumbers.jpg

P Wat

unread,
Jul 6, 2019, 11:27:14 AM7/6/19
to Osmand
Hi Peer.
A solution could be to put full faith and trust in Osmand +.
Let Osmand calculate the route from start to finish.  (Importing routes from other sources generally does not seem to be satisfactory - for me at least).
IF you then want your route to pass through specific locations you can set these up on-screen on your mobile, either in advance or while travelling.
The method is to touch the screen at the desired location - A location blob appears on the map and a menu opens.  Touch "Directions", then select either "Add as First intermediate destination" or "Add as Last intermediate destination".
Repeat as required.
If you want to save a route created by Osmand - Touch the blue/white arrow.  Swipe the resulting menu up till you see "Details". Touch "Details".  In the top right of your screen touch the down arrow (download?). You are offered a "Save" option.  Chose a file name, and save it for future reference.  It will probably be saved in "My Places".
OK?

Re Bart's videos - Agreed.  They are very good and helpful.
Paul W

Peer

unread,
Jul 6, 2019, 1:26:18 PM7/6/19
to Osmand
Hello Paul,

I am certainly gonna try to create a route is OsmAnd but I prefer creating  routes on a large pc screen and myrouteapp.com is very nice route planner.
But importing always gives problems. For example, the version of the openstreetmap that myrouteapp.com uses is a little bit older then the version of OsmAnd. I found a difference in one route because of this.

I made two tracks with routepoints in myrouteapp.com. I checked the tracks on OsmAnd and improved the tracks The smaller track (100km) has some problems. It is not possible to let OsmAnd create a route that matches the track completely. The problem in my last message was easily solved by adding an extra routepoint. But there were other situations where OsmAnd insisted on an other route then the track.
The longer track (400)km was easier. There were a  numbers of problems that were easily solved my repacing a routepoint or adding a routepoint. There was only one situation were the route could not match the track and that was a situation were the map of myrouteapp was  different from the map of OsmAnd.

So OsmAnd is capable of showing the track on the screen and that looks good. Also OsmAnd is able to calculate a route based on the routing points in the gps-file. So why does is go wrong in the recalculating process. And recalculating is necessary because there could be roadblocks or other reasons to change the route. during driving. The problems mostly start after recalculating.

But I also am going to try to let OsmAnd do all the work (no import). I let you know how it goes.
Peer

Op zaterdag 6 juli 2019 17:27:14 UTC+2 schreef P Wat:

Bart Eisenberg

unread,
Jul 6, 2019, 6:52:12 PM7/6/19
to Osmand
Hi Peer,

I downloaded your GPX and compared it with OsmAnd's routing of the same, using "Calculate route between points".  On my map, the segment shown on your screen routes properly--I'm not sure why.  The OsmAnd route differed from yours in two places, and I was able to correct those using "Avoid road".  See screen capture.  As far as I can tell, setting intermediate destinations doesn't work if you are following a GPX.  

Anyhow: that doesn't quite help your situation as you're getting different results.  And this technique may well not work for other GPXs. I still think a universal way to follow a GPX on OsmAnd is the way I demonstrate on the video, with "Calculate route between points" off and settings made to emphasize the map and reduce distractions.  You don't get traditional turn-by-turn navigation, but you do follow the GPX just as it is shown, without having to make corrections.  

--Bart

Peer's GPX routed.png

Bart Eisenberg

unread,
Jul 6, 2019, 7:05:34 PM7/6/19
to Osmand
Here's a closeup of my routing near your screenshot:

Routing near Fluitenberg.png

Bart Eisenberg

unread,
Jul 6, 2019, 7:28:10 PM7/6/19
to Osmand
Correction: on closer inspection, my route, using "Calculate route between points", varies in several places from your GPX, although it goes in the general direction and gets the area of your screen capture right.  Sorry for the confusion.  

Peer

unread,
Jul 7, 2019, 1:35:40 AM7/7/19
to Osmand
Hello Bart,

thanks for checking mt gpx route. I think it is normal that a calculated route is OSmAnd wil be different from the track on an imported gpx-file. The file is created in an other program thats probably uses different navigation settings. 

I tried yesterday to create a route with OsmAnd alone, as Paul suggested.  I noticed that the intermediate points were shown by a flag on the map. After saving the track/route and reloading it the intermediate points were shown as a circle with a star in it. The imported gpx-file does not show symbols on the map for the route points. So there must be  a difference in the saved OsmAnd gpx-file and the imported gpx-file. Perhaps thats can be a cause for the routing problems.

Creating a route in OsmAnd was not easy at first. But after a while I got the hang of it. Creating a new intermediate point or a new destination works ok. In the beginning I made a lot of mistakes so I started again many times. For my purpose, creating a route (100km +) on smaller roads this method does not work very good. To get an overview I have to zoom out. But then the smaller roads are not displayed. So I have to zoom in to see the smaller roads again And the zooming in and out has to been done many times. OsmAnd also regarly moves the map back to the starting point which is inconvenient.  I find it difficult to place an intermediate point accurately. During experimenting I experienced that OsmAnd sometimes refuses to let me pass certain points and creates a detour. I do not know why. I saved a route and oepned it again. The I wanted to make some changes but I could not change te intermediate points (circle with star). Adding intermediate points at the end of the route did not work properly. I experienced similar strange route guidance as in my tests on the motorbike. I also found out that I was able to add a new destination to the saved route but I was not able to add a new intermediate point. I saw the flag on the screen but  this point was not part of the calculted route.
So my experience with adding intermedate points and new destination points in OsmAnd is not good. I think the experience will be much better when you create shorter routes.

Navigating the track without calculating the route between point does work very good for me. I think that will the way I navigate tracks for the moment. But I hope there will be more progress in the future.
Thanks for the support!!
Peer

Op zondag 7 juli 2019 01:28:10 UTC+2 schreef Bart Eisenberg:

Bart Eisenberg

unread,
Jul 7, 2019, 2:08:47 AM7/7/19
to Osmand
After a lot of experimenting, my thinking (for the moment) is this:

OsmAnd, and other routing software too, is in the business of creating efficient routes from point A to point B.  Perhaps via points C, D, ...  Whereas people who create GPXs are generally interested in trips that are scenic rather than efficient: preferring smaller roads to highways, detours to directness, and, in some cases, ending where they started. Your GPX looks like that.  

Ideally, one would import a scenic GPX route into OsmAnd, which would create a route that duplicates it using OsmAnd map data. But the developers have posted (on Github) that this is a tough problem to solve. I'm unaware of any other GPS software that's solved it either: that takes a GPX from another source and fully duplicates it with a route providing turn-by-turn, road-by-road directions.  

So for the foreseeable future, "navigating the track without calculating the route between points" does seem like the best option. Following it takes more concentration. So for safety sake, keep your eyes (mostly) on the road.   

Peer

unread,
Jul 7, 2019, 4:10:30 AM7/7/19
to Osmand
I tested several apps a few years ago on my motorbike (TomTom, OsmAnd, Mapfactor, Sygic, Copilot). Most of these apps works by navigating multiple waypoints. Mapfactor is very good at this.
Tomtom uses a track only. I always create gpx-files (track/route) on myrouteapp.com. Tomtom  is able to import these gpx-files and convert them to the tomtom-track format and sends it to the phone. Tomtom is able to navigate a track with navigation messages based on the streets. So it is possible.

I also think that navigating the track without calculation the route between points is the best option at this moment.

Op zondag 7 juli 2019 08:08:47 UTC+2 schreef Bart Eisenberg:

Peer

unread,
Jul 7, 2019, 5:16:13 AM7/7/19
to Osmand

I was curious so I looked at the differences between osmand gpx-files and other gpx files.

I created a short route in OsmAnd with three intermediate points and a destination point. I calculated the route between points and saved the file to osmand.gpx

I created almost the same route on myRouteApp.com and saved the files to myrouteapp.gpx

Then I imported the file myrouteapp.gpx into OsmAnd, calculated the route between points and saved it to importedmyrouteapp.gpx.


So there are three files:

– osmand.gpx: a shortroute that is created in OsmAnd with 4 waypoints

– myrouteapp.gpx: almost the same route created on MyRouteApp.com

– importedmyrouteapp.gpx: the imported and saved route.

There are three sections in each gpx file: <trk> = track information; <rte> = route information and <wpt> = waypoint information


osmand.gpx:

– gpx version 1.1

-<trk>:

many trackpoints including elevation information

-<rte>:

navigaton messages.

-<wpt>

4 destination waypoints


myrouteapp.gpx:

– gpx version 1.1

<trk>:

many trackpoints, elevation is allways 0.00

<rte>:

2 via-ponts (start and finish)

3 shaping points

<wpt>:

not present


importedrouteapp.gpx:

– gpx version 1.1

<trk>:

many trackpoint, elevation information is added

<rte>

navigation messages

<wpt>

one waypoint (finish)


It is obvious that the files are very different. OsmAnd uses the <rte> section for navigation messages and stores the routing points in the <wpt> section. MyRouteApp stores the routing points in the <rte> section. The starting point is not stored in OsmAnd but is stored in MyRouteApp.

After importing the myrouteapp.gpx file. OsmAnd recognized the via-points and shaping points in the <rte> section and uses them to calculate a route. I find it strange that I cannot see the via-points and shaping points in the file importedmyrouteapp.gpx


No wonder that there are problems with navigating imported gpx-files.



importedmyrouteapp.gpx
myrouteapp.gpx
osmand.gpx

Peer

unread,
Jul 8, 2019, 4:37:53 AM7/8/19
to Osmand
When I look at the gpxfile importedmyrouteapp.gpx (see last post) I see in the section <rte> navigation announcements that are not based on the the track but on the roadnet. That is interesting.

I performed the following experiment.
1. import a gpxfile (created on myrouteapp.com with track and route in it).
2. choose navigation with the option 'calculate route between  points' (takes a while).
3. save as a gpx-file
4. import this gpx-file again
5. simulate the navigation without the option 'calculate route between  points

In the simulation I got the navigation announcements that are based on the roadnet.
I am going to test this procedure in the near future with a gpxfile that contains a route of 400 km. The calculated route in OsmAnd fits the track very well.
During test with navigating with the option 'calculate route between  points' I experienced mainly problems when the route is recalculated.The recalculation wil now be diffferent because I do not use this option.

In the simulation I had a minor issue:
the first roundabout was taken anti-clockwise.
the second roundabout was taken clockwise
the third roundabout was taken anti-clockwise
Choosen Driving Region is:  Europ, Asia, Latin America & similar

Peer

unread,
Jul 9, 2019, 10:20:44 AM7/9/19
to Osmand
Today I navigated the 400km gpx file (imported, option: calculate route between points saved). I uses my very old smartphone
OsmANd performed very well with this route. I had the normal road based announcements. There were a few places where I had to follow a detour. No problem for OsmAnd.  This is how it should be!!!!!!!!! Very good.

I also discovered the reason for the strange navigation behaviour. In the settings I checked 'Avoid unpaved roads'. When I unchecked this option the calculated route looked almost the same  track. I checked 4 gpx-files (all tracks > 100km) and there were very few differences between the track and the calculated route.
I haven't tried is while driving but I expect that this setting was the main cause for the problems I experienced.
. I will try to import a gpxfile, calculate route between points and navigate to see if the problems are gone.

My settings are:
In navigation settings:
Fastest route: checked
Avoid: all options unchecked

track specific settings:
Fuel-efficient way: unchecked
calculate route between points: checked
all other options: unchecked




Message has been deleted

Bart Eisenberg

unread,
Jul 9, 2019, 11:08:11 AM7/9/19
to Osmand
That's impressive.  I returned to the GPX you posted earlier and matched your settings. The only point of divergence--around Zuidwolde--looks like an OSM data error that appears to have since been corrected. 

So if this seems to work, what's your guidance re: creating GPXs on a PC for import into OsmAnd?


On Monday, July 1, 2019 at 4:43:39 AM UTC-7, Peer wrote:

Peer

unread,
Jul 10, 2019, 2:03:09 AM7/10/19
to Osmand
How do I create a gpx route that can be succesfully imported in OsmAnd??

There are several online route planners on the internet. I tried a few that targeted on motorcycling. The one that I like the most is: myrouteApp. The url is: https://www.myrouteapp.com/en. (there are six languages available)
You have to register on this site to used. Registering is free. The routes are online stored.
When you login you will see in the top of the screen 7 blue tabs. I use only two of them: "Routes" and "New Route".
When you click on the tab "Routes"you will see the routes that you have created.
Clicking on the tab "New Route"gives you the possibilty to create a new route. I shows a pop up:
-> Name:
    here you can give the route a name
-> Privacy mode: Public/Friends/Private
    Here you can choose who can see you route. I always choose private.
-> Mode: Driving/Cycling/ByFoot
    I choose driving for motorcycling. I do not have much experience with "cycling" (3-4 times) and "by foot" (1time)

After you made your choice you click OK and the fun begins. Myrouteapp wants your permission to know your location. I allowed it.
- You can easily add waypoints just by clicking on the map.  A route between the waypoints is instantly created.
- You can move waypoints by dragging and dropping.
-  When you click on a waypoint you will see a popupmenu withe information and the possibility to delete the waypoint.
- When you click on a route you an extra waypoint on that point.

When you are ready you can save the route in a gpx-file
- Click on the tab "Sace as". Then you wil see many save options. The first option "gpx 1.1 (route,track,poi) works fine for OsmAnd.
The name of the gpx-file is "name of the route. gpx" It is stored in the download map of your webbrowser. From there you must copy it to your smartphone.

I OsmAnd you can import the gpx-file and show the track on the screen. Then you choose navigate with the option 'calculate route between points'. This can take a very long time (2-3 minutes). When the calculated route is shown on the screen you can see if the route  covers the track. When you see differences you can go back to myrouteapp adjust the route and donwload and import it again. 
When you are satisfied you can save the calcuted route.

note:
- Use the standard settings in OsmAnd for optimal results: (fastest route, no avoid options)
- I still have problems with the start and the finish. I create the routes on the pc with the start and the finish by my house (my location). OsmAnd wants me to drive an extra block. Perhaps I should position the start and finish away from my house.

Peer

unread,
Jul 10, 2019, 9:25:39 AM7/10/19
to Osmand
I created a few routes with the start and finish at ca. 1km from my house. Now the routes are properly calculated. There are no longer routing problems in the nabourhood of start and finish

Op woensdag 10 juli 2019 08:03:09 UTC+2 schreef Peer:
.....

Bart Eisenberg

unread,
Jul 10, 2019, 12:25:37 PM7/10/19
to Osmand
So when you have OsmAnd calculate the route between the points, are the "points" the waypoints you entered?  Meaning, the waypoints and OsmAnd's routing algorithm are solely what determine the route?  

Rob Woodall

unread,
Jul 10, 2019, 4:39:24 PM7/10/19
to Osmand
Interesting thread - I've not looked into routing in much detail before

On Tue, Jul 9, 2019 at 3:20 PM Peer <v7p...@gmail.com> wrote:

track specific settings:
Fuel-efficient way: unchecked
calculate route between points: checked
all other options: unchecked

I don't see these track specific settings - where/how are they accessed?

Rob

Peer

unread,
Jul 11, 2019, 1:02:04 AM7/11/19
to Osmand
When I import a gpxfile (with track and route) from myrouteapp and choose 'Calculate route between points" OsmAnd uses the points in the route to create a new track (trk) and it creates a roadbook (rte) with roadbased navigation announcements.

I think that OsmAnd always follows the track while navigatiion. Normally the roadbook with navigation announcements is based on the track (calculation time is minimal). But when the navigation announcements are based on the road OsmAnd still seems to use the track for navigating. Only the announcements change.

procedure:
import gpxfile
calculate route between points (and wait, wait, wait)
save to new gpxfile
reload the new gpcfile and navigate without calculating route between points (No waiting time)

This last step in the procedure lets me comclude that OsmAnd uses the track for naviagtion..




Op woensdag 10 juli 2019 18:25:37 UTC+2 schreef Bart Eisenberg:

Peer

unread,
Jul 11, 2019, 1:07:37 AM7/11/19
to Osmand
When you click on the navigation button you will see a small gear wheel  for options. Click on this wheel after you selected a gpx-file you wil find the track specific options.

Op woensdag 10 juli 2019 22:39:24 UTC+2 schreef RobW:

Bart Eisenberg

unread,
Jul 11, 2019, 10:11:30 AM7/11/19
to Osmand
Thanks! I'll give this a try.
Reply all
Reply to author
Forward
0 new messages