Picture someone walking down a straight road, exactly where street directions from Google Maps told them to go. Until build 19, iseeido could decide that this person had left the route.
The road wasn’t the problem. The way the app measured it was.
A route is a list of points
A route from Google arrives as a line, and the line is stored as points joined end to end. A bend needs several points to draw. A straight stretch needs very few, so on a straight road they can be far apart. On one real road, five points covered 353 metres, and Google’s points can sit 130 metres apart.
Each time a new location arrives, iseeido answers one question: where on the route are you now. That answer moves the map, counts down the distance to the next turn, and decides whether you are on the route at all. You count as off it once you are more than 60 metres away.
The old answer was the nearest point. Halfway between two points 130 metres apart, each one is 65 metres away. That is past the 60 metre line. So someone walking down the middle of the road could be told they had left the route.
Still, then a whole block at once
There was a quieter fault too. While the nearest point stayed the same, so did the answer. The map, which follows your position on the route rather than the raw location, stood still. The distance to the next turn stood still. Then you passed the halfway mark, the nearest point changed, and both jumped a block.
On the line, not at its points
Since build 19, the app measures to the line itself. For each stretch between two points, it finds the place on that stretch nearest to you, and keeps the nearest of all of them. Halfway between two points far apart, the nearest place on the line is right beside you.
The same sparse points caused a second fault. To turn the map before a corner, the app takes the direction of the route a little way ahead of you. It used to look three points ahead. On a straight road with points far apart, three points ahead could already be round the next corner, so the map turned for it a block early. It now looks a set distance ahead: 12 metres on foot, 30 metres when driving.
Checked against a real road
The change was tested on a real 2.8 km route, with a position fed in every 10 metres along it, both exactly on the route and with 8 metres of noise added.
- 2 to 0times a position along the route was matched as off the route
- 31 to 0jumps of more than 25 metres in the distance to the next turn
- 4 mthe furthest you were drawn from where you were in that test, where it was up to 60 m
How the nearest place on the line is found
- Each stretch between two points is metres to a few hundred metres long, so it is treated as flat. East to west distances are scaled by the cosine of the latitude, and that is all.
- The search starts from where you were last matched and looks forward, so a route that later passes close to itself can’t wind the directions back. A small allowance backwards means a location that wobbles while you stand still doesn’t push the match forward a little at a time.
- If nothing in that forward search is within 60 metres, the whole route is searched again, so doubling back or rejoining further along still works.
- The first location on a new route is checked against all of it, since you may be starting partway along.
What it means with the phone in your hand
On a long straight road, the map now moves with you instead of waiting and then leaping. The distance to your next turn counts down as you walk, not a block at a time. And the map turns for a corner as you reach it.
When iseeido does say you are off the route, and that it is finding a new one, it is because you are more than 60 metres from the line Google drew, not because you are between two of its points.