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 '17 at 4:28

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)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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