Angle between 2 GPS Coordinates
问题 I'm working in another iPhone App that uses AR, and I'm creating my own framework, but I'm having trouble trying to get the angle of a second coordinate relative to the current device position, anyone know a good resource that could help me with this? Thanks in advance! 回答1: If the two points are close enough together, and well away from the poles, you can use some simple trig: float dy = lat2 - lat1; float dx = cosf(M_PI/180*lat1)*(long2 - long1); float angle = atan2f(dy, dx); EDIT: I forgot