Forum: General Topics

Forums / General Topics / Following a route.

 

Subject:Following a route. 

ChrisM

9:46
Friday
23-May-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Seems to work quite nicely, but I saw something slightly strange going on yesterday.
(I had the 'notify when waypoint reached' option turned on, and at one point, it seemed to be bleeping every few steps to say 'waypoint reached' even though as far as I could tell the waypoints were 100ft apart)

Could you explain how the route following screen handles 'missed' waypoints (I'm wondering if I confused it by walking down the other side of the street??).

It seems that if you go past a waypoint without actually hitting it then the program skips to the next one. This is the behaviour that I seem to be seeing, but I can't work out exactly what it is doing.
Could you clarify exactly what logic is used for determining when a waypoint has been 'missed', and how is the next point chosen? Also, is there a way of adjusting this behaviour?
Regards,

Chris.
 

Stephen

21:43
Friday
23-May-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Chris,

First off - just to clarify - when you say 'Waypoint', I think you're talking about 'Routepoints'...!

" It seems that if you go past a waypoint without actually hitting it then the program skips to the next one. "

Yes, this is about right. Basically the 'Route' is simply a line of connected dots in space, along which TMJ will try to guide you. It doesn't do anything too clever. Once it thinks you have reached, or passed a particular point, it will then forget that point and focus on the next one. (It only ever moves 'forwards' in the list, never backwards, and doesn't skip points). In order to work out whether you have actually reached a point it checks for one of a couple of conditions:
- either you are within 5 metres of the point, or
- you are within 250 metres of the point, and are now moving *away* from the point. (eg, you reach a position that is 150m from the point, then you start to move further away again. If you get to 5% more than that minimum distance, ie in this case ~168m, it will move on to the next point).

The routing is generally designed to get you to the final destination itself - its not too concerned whether you actually *hit* each individual routepoint (and the accuracy of GPS make this essentially difficult to accurately ascertain anyhow!).

It sounds like the strange behaviour you've been seeing could be because your routepoints are quite close together - 100ft really is quite a small distance in GPS terms. I've tried to calibrate TMJ for routepoints that are further away than this (I'd suggest 100m as a reasonable minimum for walking, and up to a 1km or more for driving).

Theres not currently any way of altering this behaviour, I could probably build this in if necessary, although I've generally found it to work fairly well in my own testing. Any suggestions alway welcome though!

Cheers,
Stephen
 

ChrisM

19:50
Sunday
25-May-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Hi,

Yes, I did mean routepoints (I think). Your explanation of how the route-following logic works explains exactly what I was seeing. However, the way it currently works could cause a problem...(maybe)
I'm not sure if this is only because I have my routepoints too close together, but consider the following scenario: If I'm following a route, and I come to a cross-roads and accidentally take a wrong turn, (ie I'm moving away from ALL the points in the remainder of the route), TMJ fairly rapidly starts to move down the list of routepoints.
I'd be interested to hear your comments on the above, and I'll have a play around with changing the distance between the routepoints.

Cheers!

Chris.
 

Stephen

10:20
Monday
26-May-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Chris,

First off, in re-examining the routing code I've found that I forgot to mention a third condition which might explain what you are seeing, so to recap, the three conditions where TMJ will jump to the next routepoint are:

1. You are within 5 metres of the point, or
2. You are within 250 metres of the point, and reach a location that is 5% further away than the minimum distance from the point, or
3. You are more than 250 metres from the point, and reach a location that is 25% plus 50m further away from the minimum distance from the point.

If it wasn't for condition #3 then your crossroads scenario wouldn't be a problem since once you reached a point 250m from the crossroads it would stop moving down the routepoint list.

Maybe this third condition isn't really necessary, but its basic purpose is to prevent a situation where a particular point has been purposely missed, but TMJ would otherwise permanently highlight this missed point rather than moving down the list where there may be a point that is more suitable.

I've thought about other more effective ways that this could be achieved though have yet to look into it further. Perhaps when this third condition is reached, instead of just moving to the next routepoint it could try to be a bit cleverer and scan through the whole route to see if a more suitable routepoint exists. Or else have an option to turn this on/off or specify the 'minimum distance thresholds' to customise the routing for walking or driving, etc...

Any thoughts?

Cheers,
Stephen
 

ChrisM

14:22
Monday
26-May-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Hi Stephen,

I can understand why your code works the way you explain, and I think that if you want to keep it simple then the way it works now is fine. To be honest, as long as I use a bit of common sense whilst using it, and make sure I'm always within a sensible distance of the next routepoint it works great. If you notice that you suddenly start clicking rapidly down the list, it's a pretty massive hint that something's gone wrong, and it is fairly easy (if necessary) to move back up the list and find the routepoint closest to the current position (the current position and currently select routepoint are both clearly shown on the screen, so doing this is trivial).

As to making the code smarter... I suppose if the program detects that you have started moving away from the point it believes to be the next in the list then it could scan the list and choose the closest routepoint to the current position. Doing it this way, it could even move back up the list if you changed direction, though it should (possibly optionally) give a warning if this happens. I don't know if you'd want that to happen under normal circumstances though anyway.
Having the program automatically select the closest routepoint to your current position would make following a route easier(less brain power required) though, as even if you strayed from the correct path, the program would automatically guide you to the closest point at which you can pick up your route again... at the moment, if this happens it tends to rapidly move through all the points. Though I said, if you use some common sense when following the route, this needn't be a problem...

I haven't really thought the above through too carefully yet, so I hope there isn't an obvious flaw!
:-)

Chris.
 
 

Stephen

15:43
Monday
26-May-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Chris,

Not sure if you'd tried this but when you're on the route screen if you press the '3' key a second time it will select the nearest routepoint to your current location.

Perhaps if there was an option that would automatically run this function whenever the 'condition 3' situation was encountered this would do pretty much what you're suggesting. Should be quite easy to add this, although I'd maybe limit it to, say, once every 10 seconds, so that its not constantly recalculating every routepoint's distance (with a long route this could get quite slow)!

Stephen
 

(You must be logged in to post a reply to this thread)