Steve,
It looks like you've already got a conversion but I'll add what works for me as an alternative.
Some years ago, long before GPS, I programmed a calculator with the following formula.
During the winter I transferred it to Delphi 7 as an exercise. My results are displayed in Statute, miles, Nautical miles, and in Kilometers. The calculation is straightforward if you bear in mind that this is Spherical Trig and not Plane.
Degrees are input in the decimal form. My interface will take either minutes or decimal and the conversion, if necessary, is fairly easy after recognition.
Recognition can be accomplished by simply leaving a separate box for minutes and seconds blank to default to decimal format. Either way, the degrees are converted to radians prior entering the function performing the actual calculation.
The actual calculation, it’s called ‘RealSolution’ simply because it’s a real number, is as follows:
RealSolution := ((ArcCos((SIN(LAT1)*SIN(LAT2))+(COS(LAT1) * COS(LAT2) * COS(LNG1-LNG2))))*GoRad)* (24879.6737/360);
Where LAT1&LON1 are the start and LAT2&LON2 are the stop.
The “GoRad” is the function (GoRad : = 180/3.14159265

that converts the trig results back to degrees prior to being multiplied but the circumference.
The rather extensive circumference constant is in Statute miles but should work with any measure.
The calculation function returns Statute miles, which is then converted for display as indicated above.
It tested properly for Western half of the Northern hemisphere.
Additional measure requires a conversion to address the Eastern half as would the variance posed by the corresponding portions of the Northern and Southern hemispheres as well North to South.
I’d also like to try to calculate a bearing as part of the distance calculation maybe next winter I’ll go back to my old trig book and get to it.
It gets a little tricky there because of the spherical aspects of the Great Circle Route versus Mercator.
Given all the help I’ve received at this site, I hope I’m able to return something here.
Bill K