I have a Latitude & Longitude for two locations (me in the West, him across the country), and a web-calculated GPS point for each. I'm trying to figure out which direction -- per my compass -- to look out "toward him" from my rooftop.

Google Maps helped me find the two strings of latitude/longitude (I'm 34.abcdef / -118.stwxyz) and a GPS of that point (I'm at 65 47 31, or however you write it), but I hope you can tell me how/where to point my compass so I aim directly at, say, 40.abcdef/-77.stwxyz.

The compass.google tool was beyond me to even get started.

  • 1
    Never mind! I finally found a site called SunEarthTools (seems to be for solar set ups) that helped show me how to set my compass so I can face his direction when we're on the phone -- thanks anyway! ~ @TheGirlPie
    – GirlPie
    Feb 16, 2017 at 4:28

1 Answer 1


A search yielded this website.

It shows the following formula for calculating bearing:

θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )

where φ1,λ1 is the start point, φ2,λ2 the end point (Δλ is the difference in longitude)

Bearing is the horizontal angle between the direction of an object and the true north as defined in Wikipedia

Bearing is different from the angle which the north needle is pointing to, for example: compass bearing example
in this picture bearing is 330°, although the needle is pointing to 30° (which is simply -330°)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.