Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 21, 2013, 02:04 PM   #1
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Programming Turn-by-turn Navigation

I'd like to look into programming some turn-by-turn navigation, or as I like to call it: navigation tracking. That is, you have a route, how do you detect that the user stays on that route. Does anybody know of any good resources that go into algorithms and such for this? Is rolling-your-own completely nuts? Thoughts? Suggestions?
__________________
dejo is online now   0 Reply With Quote
Old Jan 21, 2013, 02:36 PM   #2
KoolStar
macrumors Demi-God
 
KoolStar's Avatar
 
Join Date: Oct 2006
Location: Kentucky
Send a message via AIM to KoolStar Send a message via Skype™ to KoolStar
I might look into some of the open source mapping items such as open maps or some other providers. Some have build libraries that you could look at to get an idea.
__________________
"Innovation distinguishes between a leader and a follower." : S.J.
KoolStar is offline   0 Reply With Quote
Old Jan 21, 2013, 04:30 PM   #3
xArtx
macrumors 6502a
 
Join Date: Mar 2012
You took a turn that does not end at the next node expected in the route that
was found and stored with the recursive algorithm that found the shortest route
(before one way streets, and tolls etc. enters into it).

I don't know what liberty you have with Apple maps, but if it's your own GPS
program, the difficulty is in the auto routing, and maybe lock to road depending on the platform,
not checking the user is on the route.
xArtx is offline   0 Reply With Quote
Old Jan 21, 2013, 04:41 PM   #4
dejo
Thread Starter
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by xArtx View Post
I don't know what liberty you have with Apple maps, but if it's your own GPS
program, the difficulty is in the auto routing, and maybe lock to road depending on the platform,
not checking the user is on the route.
I've found solutions for routing; it's for the tracking that I don't find a lot of information readily available.
__________________
dejo is online now   0 Reply With Quote
Old Jan 21, 2013, 05:09 PM   #5
xArtx
macrumors 6502a
 
Join Date: Mar 2012
So as you're following your route, your program is checking off each node
as it is passed at every intersection where a turn is required.
Ignore points in a polyline that only represent bends in the road and not intersections.

At least for Garmin maps (and I suspect every other data map), roads that
intersect or join always have exactly the same coordinates where they meet,
so your node list can be a structure containing the coordinate pairs for intersections of the route.

http://computer.howstuffworks.com/ro...algorithm3.htm

In the above example, the preferred route is A,B,D,E.
If you took the wrong turn at node D, and headed back toward node C,
it is easy to determine you are on a line (road) that does not connect node E.
Your GPS doesn't check that you took a left turn at node D,
it checks that you are still connected to the path that ends in the next node.

I think a commercial GPS gives a little bit of time to reroute to allow for GPS
error which is ok because you weren't going to do a 180 on the road and head
back in most cases. you need to reroute from node C.
xArtx is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:20 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC