Locus Map - forum

Development => Other features => Navigation & Guidance => Topic started by: Andrew Heard on May 18, 2016, 02:50:30

Title: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 18, 2016, 02:50:30
Observation: Locus will (sometimes) start in guiding mode (ignores the first waypoint/ navigation command) but with the same track other times starts correctly in navigation mode (displays distance to first navigation command). It is not dependent on whether I "Add new route" in Locus or use To/From quick-point BRouter method.

With a very simple track Locus starts 100% reliably in navigation mode.

I have also found a workaround - while guiding then tapping "Recalculate" Locus then always goes into navigation mode and displays the next waypoint (navigation command if any).

I don't know whether this applies more widely than with using BRouter as a navigation source because I only use BRouter. I hadn't experienced this problem before BRouter 1.4.x, but then again I haven't used navigation for a few months.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 18, 2016, 08:14:57
Just guessing -  Is possible you have for any reason too low value of off-route threshold,
when Locus switches to guidance instead of naviagtion ?

Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 18, 2016, 08:15:58
Note if you disable the GPS (satellite screen > tap to disable) then it is even simpler to see this problem. Depending on other Locus settings I do this: move cursor to track > tap on track > Navigate > Navigate - hear double beep - Locus warning that off-track. Observe that Locus is in guidance mode rather than navigation mode. Ensure cursor (simulated GPS position) is on the track > tap top/left Navigate question mark icon > Recalculate - now navigation is working.

The UI now feels very unresponsive while simulating navigation, which suggests Locus is using lots of CPU for no good reason. I will be able to confirm this tomorrow after I measure battery % after a longer ride. It is normally about 3% battery per hour.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 18, 2016, 08:17:31
Edit: Other reason may be Locus gets confused and under mysterious conditions interprets Hint waypoints as waypoints for Guidance. :-)
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 18, 2016, 08:18:07
Quote from: poutnikl on May 18, 2016, 08:14:57
Just guessing -  Is possible you have for any reason too low value of off-route threshold,
when Locus switches to guidance instead of naviagtion ?
I generally use "Maximum allowed deviation"= 50m. It has never been a problem before.

Quote from: poutnikl on May 18, 2016, 08:14:57
Other reason may be Locus gets confused and under mysterious conditions interprets Hint waypoints as waypoints for Guidance.
Either new setting or something else has changed because I never had this problem before now.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 18, 2016, 08:24:38
Quote from: Andrew Heard on May 18, 2016, 08:18:07I generally use "Maximum allowed deviation"= 50m. It has never been a problem before.
I like saying "Murphy's laws are laughing seeing  It should not matter"  :-)
I would try to test big value.

Edit> I usually use Warning threshold 50-80, recalculation threshold 100-150, guidance threshold 200-400
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 18, 2016, 10:00:43
With some help from @poutnik I have more to report. I have navigation recalculation mode = Never. It appears in this mode that when navigation along existing track, and if GPS position is not precisely over track, then navigation mode never occurs, or is very unreliable:
(http://s32.postimg.org/m8st41apt/guide.jpg) (http://postimg.org/image/m8st41apt/)

I started navigation 10 times, and only once did it work. The other 9 times guidance mode commenced, and never switched to navigation. It also seems that the longer the track the less likely navigation will commence.

When I set recalculation mode = Route, operation automatically switches from initial guidance to navigation shortly after moving, so for now I'll use this mode.
(http://s32.postimg.org/u3me9ji4h/nav.jpg) (http://postimg.org/image/u3me9ji4h/)

When I read the manual http://docs.locusmap.eu/doku.php?id=manual:user_guide:functions:navigation:settings&s[]=recalculation it is still not clear when mode = Never why starting navigation is so unreliable if the position (as shown in screen cap) is directly over the track.

Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Menion on May 18, 2016, 13:48:39
Good day guys,

@Andrew: suggest to check important difference between these states:

What I see on your first screenshot looks like second option - navigation, but you are too far away from track. In this case, you are far away from a point on which Locus tries to navigate you. Do not know how you get into this state, but button "Nearest point" in navigation menu, do not helps here?

Also maybe a track itself may be a problem. In case you have starting point too far away from you, this problem may happen. You may try to compare start of navigation on really loong straight street VS start of navigation somewhere on curved roads in mountains, if there will be any difference.

Anyway if you give me all I need for simulating of this problem, I'll gladly check it.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Čelda on May 18, 2016, 14:47:30
BRouter seems to recognize roundabouts, wow !
So Locus seems to be usable as world-wide offline navigation too !  8)
What a pity a route once found cannot be EASILY modified by via points, can it ? You must start over :-(
http://forum.locusmap.eu/index.php?topic=4934.msg40606#msg40606
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 18, 2016, 19:09:55
Quote from: Čelda on May 18, 2016, 14:47:30
BRouter seems to recognize roundabouts, wow !
So Locus seems to be usable as world-wide offline navigation too !  8)

Until you hit turn restriction OSM relations....
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 01:19:48
Quote from: 0709 on May 18, 2016, 13:19:14
Hi Andrew,  No brouter app installed !

On common paths "nearest point" not always helps to *adjust position on track. How to tell locus exact track position progress on a common trackpath ? = not implemented !  Idea ? By Tap => Navigation Arrow => Open Itenerary list => tap new target navpoint  => opens navpoint on map: IF agree, confirm as next navpoint target ?
@0709 - are you testing with navigation recalculation=Never - that is the central issue for me! If I set recalculation=Route then Locus starts navigation OK, BUT I don't want recalculation on, I just want a notification if turn wrong way.

Regards your simulation topic suggestion - I had similar suggestion - http://help.locusmap.eu/topic/display-itinerary-and-map-side-by-side-simulation-mode but no interest. Now that BRouter can accurately calculate track waypoints I think it would be very nice to have a method to move from waypoint to waypoint to simulate riding the track.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 01:23:38
Quote from: Čelda on May 18, 2016, 14:47:30
BRouter seems to recognize roundabouts, wow !
Not sure how your comment is related to the topic?
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 01:48:12
Quote from: Andrew Heard on May 19, 2016, 01:47:37
thanks @menion

Quote from: menion on May 18, 2016, 13:48:39"Maximum allowed deviation"
I had default 50m, but I've never modified this setting, I have now set to 200m, but it has not improved the situation

Quote from: menion on May 18, 2016, 13:48:39What I see on your first screenshot looks like second option - navigation, but you are too far away from track
how can you tell that? I have position precisely over the displayed track in screenshot?

Quote from: menion on May 18, 2016, 13:48:39Do not know how you get into this state yes
easy - I started navigation mode on the GPS position shown in 1st screenshot, with recalculation=Never

Quote from: menion on May 18, 2016, 13:48:39button "Nearest point" in navigation menu, do not helps here?
yes - mode switches from from guidance to navigation mode when "Nearest point" is tapped

The central issue seems to be with seting navigation recalculation=Never. In this mode navigation is very unreliable in "locking onto" the start of the track even when I am within few metres of the track as displayed on map. It is quite easy to simulate when GPS is disabled. When the track is simple/ short navigation will start reliably, but as soon as track is more realistic Locus never switches from guidance to navigation mode. Also while in guidance mode the UI is extremely "unresponsive" - using all CPU.

Have attached 2 tracks (short.gpx, long.gpx).
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 04:43:06
I note another user has now reported on this experience http://help.locusmap.eu/topic/problem-with-version-3-17 (http://help.locusmap.eu/topic/problem-with-version-3-17) although surprised not more.

After some more walking tests I find that even tapping "nearest point" isn't always 100% reliable. Worked 4 out of 5 times:
(http://s32.postimg.org/75nuohj29/2016_05_19_12_37_02.jpg) (http://postimg.org/image/75nuohj29/)
Clearly displayed GPS position is within 10m of track, and walking in direction of track, but still Locus doesn't go into navigation mode.

settings: max. allowed deviation:200m, auto-recalc:Never, strict following:off

Any other relevant settings or details I can report?
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 07:31:30
Quote from: Andrew Heard on May 19, 2016, 01:48:12
Quote from: menion on May 18, 2016, 13:48:39What I see on your first screenshot looks like second option - navigation, but you are too far away from track
how can you tell that? I have position precisely over the displayed track in screenshot?

From the Question mark in top left corner ?
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 08:05:15
I have turned off recalculation for testing purposes, using latest Trekking-poutnik.brf profile template.
having GPS off, screen of Locus placed near of the middle of the route.

If the route is generated by Brouter and imported as GPX file , it works as expected, switching between navigation ( hints ) and navigation-guidance ( question mark ), if I move the pointer around the route.

If the same route is calculated via Locus navigation interface, it switching to pure Guidance mode ( The guidance icon )
and will not revert to navigation when on the route.

Edit: Also, for route calculated via the interface, there are not displayed the hint points.......
.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 08:29:21
Well, without BRouter or with GRaphhopper one cannot properly test the Brouter-Locus hint passing implementation :-)
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 08:35:49
Quote from: 0709 on May 19, 2016, 08:16:53
Question:  (hints missing ?) Do you mean exported that track into gpx file (or tcx ?) and then reimported ?

I have not mentioned any export. Also, BRouter does not generate TCX. Brouter can pass the route to Locus Either as GPX to import, either via Locus navigation API. The latter probably chokes on the hints for now.

Route generated by BRouter as GPX and then imported to Locus from MapItems is fine, with hint points attached to route and navigation<>navigation-guidance works fine - as worked well before for testing Locus and Brouter versions..

The issue I found for Locus Brouter Interface routing. Hint points are NOT placed on the route and Navigation switches to pure Guidance mode.Like if Locus interpreted somehow the route provided via interface like guidance waypoints set.

Edit> Perhaps I have misinterpreted a Menion notice the interface is hint ready, as it was not before yet.
He may have just meant he GENERALLY uses Brouter only via interface, but interface is not hint ready yet.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 08:48:59
Quote from: poutnikl on May 19, 2016, 07:31:30
From the Question mark in top left corner ?
I don't understand your question. Do you mean tap "nearest point" from the Question mark in top left corner? - yes
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 08:53:41
Quote from: poutnikl on May 19, 2016, 08:35:49
I have not mentioned any export. Also, BRouter does not generate TCX. Brouter can pass the route to Locus Either as GPX to import, either via Locus navigation API. The latter probably chokes on the hints for now.
@poutnikl - no I am pleased to say that Locus displays the hints (you mean waypoints as navigation commands?) when track generated with BRouter is imported via Locus navigation API.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 08:56:16
Quote from: Andrew Heard on May 19, 2016, 08:48:59
Quote from: poutnikl on May 19, 2016, 07:31:30
From the Question mark in top left corner ?
I don't understand your question. Do you mean tap "nearest point" from the Question mark in top left corner? - yes

My question is the answer to your question - How Menion realized from the picture you are too far from the route during navigation.

As in such a state the big top left field displays the question mark, being in navigation-temporary-guidance mode.

If it is in pure guidance mode, there is just a smaller guidance icon.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 08:58:12
Quote from: Andrew Heard on May 19, 2016, 08:53:41
@poutnikl - no I am pleased to say that Locus displays the hints (you mean waypoints as navigation commands?) when track generated with BRouter is imported via Locus navigation API.
Interesting, so we may have each our own set of not overlapping issues.. :-) Each new feature works, but no new feature works for everybody :-D
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 09:05:39
Andrew - do you use in your profile for hints generation auto-choose(1), or locus(2) settings ?

Edit: Hm, this does not matter. GPX route import DOES work for me correctly, API interface DOES NOT.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 19, 2016, 09:12:00
Quote from: 0709 on May 19, 2016, 08:45:50
I know brouter has no direct tcx output...but Locus has. I reported (without brouter app !) no changes in new Locus 3.17  version standard behaviour.  Andrew said: I never had that issue before...but before there where no hints generated ? Anyway you pointed to the exact brouterapp/Locus combination problem..so nice report.
Before, hints were generated by Locus from the route shape only.

GPX based hints are fresh, but worked for last few Brouter and Locus updates.

API based hints were added just recently, I have not experiment with them until now.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 19, 2016, 09:37:15
Thanks 0709. That's very interesting that you could go into navigation mode with my long track. To my surprise I could go into navigation mode with your test track 100% reliably too (attached). That now suggests to me the bug has something to do with the imported track. Not much to do with any Locus navigation or guiding settings. @Menion, are you following this discussion?
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 20, 2016, 07:44:36
It seems that the issue - see  also http://help.locusmap.eu/topic/problem-with-version-3-17 (http://help.locusmap.eu/topic/problem-with-version-3-17) is related to misinterpretation of Locus Navigation option Compute instructions.

Its true meaning by Menion is

Compute instructions
- enabled: routing engine create commands by itself, or Locus generates them if they are missing
- disabled: routing engine may create commands by itself, anyway they are removed. "No computed instructions" really means no instructions.

I kept it previously OFF, thinking it forces the generation of Locus own hints, based on the route shape only.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 20, 2016, 09:49:32
Yep - 2nd video is exactly my sequence and experience. Thanks 0709 (!) A picture often tells a 1,000 words (although file size for 1,000 words is probably far far smaller than video LOL).
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: poutnikl on May 20, 2016, 14:01:07
Quote from: 0709 on May 20, 2016, 09:45:06What Andrew is reporting has nothing to do with the brouter app itself...its about Locus. 

So did my last post.. :-) And it has perfectly fit the subject line.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Andrew Heard on May 21, 2016, 00:40:01
The Locus 3.17.0.2 beta fixes the issue we are discussing here. Well done Menion.
Title: Re: Locus/Brouter incorrectly starts in guidance instead of navigation mode
Post by: Menion on May 23, 2016, 06:38:10
Glad to hear it guys and thanks for a help.