Ok, so I was never good at Trig. I am attempting to calculate the Great Circle Distance using the Haversine formula. The distance between 1° on each leg should be ~97 miles but alas, my formula is not. Any help by someone smarter than I would be appreciated.
I think the problem is with your expectations, not your code. 97 miles would be about right for 1° legs near the equator, but at the latitudes you are using in your example, it would be closer to 78. The lines of latitude will be about 69 miles apart, for a 1° difference, wherever they occur, but longitude lines get closer together the farther you get from the equator. At 58.5° latitude, they are about 36 miles apart.
OK. I do see a problem. By default the sin( and cos( functions use radians, not degrees. You need to include a degree statement to get it to switch, or you can leave it that way, and convert degrees to radians.
radians = degrees*(π/180)
The arctan( function will use radians no matter what, but that’s fine, because that’s what you want here.
Robert, I have a suite of navigation procedures in the Database Exchange - called CustomNavigations. These should do anything you want without bothering with the hassles of spherical trigonometry.