Hello guys,
I guess some of you remember me. I developed an app (actually web app) to help blind users to navigate. After doing so I got an advices to make it as a native app, because web interface, impossibility to make app as a service and other glinches that creaped out, so I finally decided to make an native Android app as a navigation for the blind.
About 6 years ago I developed an app called Walk helper for blind as well and got no less than 10k downloads which is pritty impressive I can say, especially when it wasn't very good. It didn't have turn by turn features and could be used only for custome routes and since I lost it's sourcecode, I dropped that as well.
Now I intent to do it on my freetime so it could be a bit slow, but I already began to experiment with Mapquest, Open street maps, Google maps APIs. I don't know yet which way will I decide to go, however for example with Mapquest, I get turn-by-turn steps and already got lucky extracting / parsing them. So I have lat/ lon, names, distances... I already made calculations for cardinal directions (east, southwest etc.), clock directions, as well as by degrees of-course, so you would no the way you're heading to (relative directions) in your prefered manner. I guess just simple as turn right, or turn sharp left / slight left will be implemented as well, because there is almost same algorithm for all of them.
Now my biggest challenge:
I do have calculations of a distance from the current location to the next point that I need to approach, absolute direction in a glance of a true north, relative directions as well as I said, accuracy, movement speed, but I have no good algorithm of detecting when to asume that user reached the point so I should show him / her the next step. In the past that is what I was doing:
I calculated the distance between current location and the current step / point and threshold as for instance 10 meters, so if your distance to the current point is less than 10m, you got redirected to the next point. Also if your relative direction to the current point shows that point is behind you (something in range of 135 and 225 degrees) and now you're heading to the next step (in range of for instance 315 and 45 degrees), then you got redirected as well. I don't like this algorithm, because streets aren't always straight and routing services aren't always that friendly to add extra steps during the slight turns of a street when it does so. I can check an accuracy and modify threshold of a distance in terms of it, but I don't like that as well, because sometimes routing services give points that are in a middle of a street and actually you can not locate there and got redirected a lot later than that, or might not be redirected as well due to not straight streets.
I thaught of a bounding boxes which would help in termps of a shape of street, but routing services do not give that information for a single step, only for a wide of all route. Now I consider about the formula which calculates lat / lon by giving coordinates of a point, bearing and the distance to get where point would be. So my point is to add points each 10 meters from the current step towards next point and always mesure distance from current location to the virtually made points and mark them as user crosses by. Although it looks better than algorithms I mentioned before, but it still the distance which creeps especially near toll buildings or so.
I just need some thaughts when should I redirect user to the next step / point and how to check properly if user follows the route or not?
Pages 1