I need to compute the angle between the x-axis from A, and the point B, where the point A is the school and B is the student house. I have the longitude and latitude of the school and all students All the angles will be computed between the horizontal axis and the segment [School, Student] = [A, B].
I tried Math.atan in c# .. but it calculates the angle between the two points without taking into account the x-axis
will this method help me ?!
Cos(alpha) = (Lat B - Lat A) / distance(AB)
where alpha is the angle I need to find
thank you
Atan2
instead of atan. – Kevin