Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ha! And my sister went to Egypt and looked up the gps distance to home (Iowa): 8000 miles. Off by 50%. Why? The programmer was doing cartesian distance instead of great-circle. So yes, if she drilled a tunnel through the Earth's core, it was only 8000 miles. :)


No, 8000 miles sounds about right for the great-circle distance on the surface from Iowa to Egypt.

First, the diameter of the Earth is not quite 8000 miles, but 7926. So if anything says more than 7926 (plus maybe the height of a mountain or whatever), it's not calculating a straight line in Cartesian 3d space.

Second, that distance of 7926 miles would be from a point to its antipode. Iowa is not antipodal to Egypt, not even close. The antipode of Iowa is in the Indian Ocean and hundreds of miles from any land. The straight-line distance from Iowa to Egypt through the Earth's sphere would be more like 6000 miles.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: