My bad on the homework thing - I mean, you know how this question was sounding. Can't blame us (me)! Anyway, welcome aboard.
Lemme make one question-comment... are you trying to get accurate distances on the globe using a Mercator projection? Cause... you can't right? My humble understanding of geometry (taking the earth as a sphere) dictates that you need to correct for the actual shape of the planet using a suitable coordinate system.
If you've done so, then great. If this sounds foreign, then imagine a 6 inch line in the map drawn just under the north pole. How many miles long is that? Next imagine the same-length line drawn horizontally near the equator. That one will represent way more miles.
So that's the comment. The question is: what's your distance formula?
Thanks STx. I don't see how "homework" came into it — must be something between the lines that I can't see — but hey, no problem at all.
No, the distances are all calculated internally for a 'spherical' earth (using high-falutin' trig functions that I couldn't possibly understand!) but the RESULTS are plotted on a 360 x 180 map — hence "Mercator" projection.
I'll see if I can find a link to the original program: "MicroMUF".