Having two points (longitude, latitude) on earth, if I am sure their distance is under 100 km; how much error will I have using tunnel distance approximation? (Defined at here)

Note: Currently I am using haversine formula, but since my points are normally in a 2 km range (at 99% of time and for other 1% it goes from 2 to 100 km) I think I do not need that complex calculation.

  • Hi, could you give sample coordinates so we could do a comparison using the two methods? – R.K. Nov 30 '12 at 2:17
  • Some sample coordinates would be nice. – R.K. Nov 30 '12 at 10:29
  • For example distance between (lon:51.46058,lat:35.79809) and (lon:51.4600768535088,lat:35.79810428783) - which I know it is under 200m. – Kaveh Shahbazian Nov 30 '12 at 11:02

Let's assume your worst case of 100km. The radius of Earth is approximately 6378.1km. So we can calculate the angular distance as follows:

angular distance = 100 / 6378.1 radians

Now we compute the tunnel length distance. We can do this by considering an isosceles triangle with two sides of length 6378.1km, and angle 100 / 6378.1.

So the third side has length:

d = 2 x 6378.1 sin(1/2 x 100 / 6378.1) = 99.99897575282311km

So the error is approximately 1m in the worst case:

100km - 99.99897575282311km = 0.001…km ≈ 1m
| improve this answer | |
  • (+1) Well done! Incidentally, the tunnel itself runs surprisingly deep--about 784 meters in this case--even though it's only one meter shorter than the surface distance. This depth is called the sagitta. – whuber Nov 30 '12 at 13:37
  • Actually, I think you made a mistake and forgot to divide the chord length by two. The sagitta is actually ~196m. Still surprising. :) – Jason Davies Nov 30 '12 at 15:04
  • You're right--in my haste I didn't check the formula; I knew in advance the depth would be fairly large, so the answer wasn't sufficiently surprising to make me cautious! (The inverse of this problem got my attention some 40 years ago. Ask anybody who thinks they're knowledgeable about geometry this question: if you bend a 100 km rod upwards into an arc so that it spans a distance merely one meter shorter, how high will it rise? The sagitta answers that question and you have now seen it's around 200 m.) – whuber Nov 30 '12 at 17:08

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.