[Routing] Turn by turn instructions

Mark Williams mark.666 at blueyonder.co.uk
Thu Jul 24 22:44:40 BST 2008


Nic Roets wrote:
> I reimplemented turn-by-turn instructions in gosmore. Here is the basic logic :
> 
> Look ahead at the predicted route for up to 300m. If there is a
> junction (defined as a node with 3 segments) and the predicted route
> makes a turn smaller than 45 degrees, continue looking further ahead.
> If the turn is larger than 45 degrees, output either "turnLeft",
> "turnRight", "keepLeft" or "keepRight". The latter 2 are used then the
> turn junction wasn't the first junction encountered.
> 
> I'm not too used to roundabouts (not too many around here) and I've
> never seen a satnav operate at one. But I suspect the best idea is to
> tell the driver how many exists to skip.
> 

I think line 3, definition of a junction,  needs to be '3 or more
segments' and forks in the road want taking into account; where a
Y-shape comes in at, says, 44 degrees either side, this would be quite a
 pronounced junction & doesn't want ignoring.

My car does like Marcus' one, 'At the roundabout take the nth exit'. The
record is, I think, 15th!! It needs to count service road exits as well
as proper ones - this can be confusing otherwise.

It also has an irritating habit on motorways of telling me to turn right
at every exit (in UK, so this means 'Don't turn left' really). This is,
clearly, a thing to avoid, so your algorithm looks good!

The other thing I do like is the prior warning; I get 2 icons, one
saying eg left turn in 5 miles, for the next event, also one warning
what comes after that - so when you get turn left....in 50 feet turn
right... it isn't a total surprise.

Mark





More information about the Routing mailing list