You can get closer to the actual radius at the point (s) where you are measuring the distance (assuming you are calculating a sequence of relative small distances).
Assuming the earth is an ellipsoid with the main axis a, is the average equatorial radius, and the second axis b is the average polar radius, you can calculate the point on the ellipse represented by these two axes using the current latidude. The calculation is shown and explained here .
(Note: this ellipse can be considered as a cross section of the earth through the poles and the point where you want to calculate the distance)
This gives you the point q = (qx, qy), the radius at this point is r = sqrt (qx ^ 2 + qy ^ 2). This is what I would use to calculate the Haversin formula.
source share