6
$\begingroup$

I am a Math student and don't know about longitude and latitude. This question was asked in CSIR-NET Mathematics. Please help me to solve it.

Two points $A$ and $B$ on the surface of the Earth have the following latitude and longitude co-ordinates:

A: $30^\circ $ N , $ 45^\circ$ E

B: $30^\circ $ N , $ 135^\circ$ W

If $R$ is the radius of the Earth, what is the length of the shortest path from $A$ and $B$?

$\endgroup$
  • $\begingroup$ This question was in "general aptitude" section. Is there is a simple way to calculate? I am wondering how a "maths student" can answer this question? $\endgroup$ – Learner Feb 10 '16 at 14:14
  • 1
    $\begingroup$ It was asked before here....: stackoverflow.com/questions/365826/… Edit: Besides the obvious answer that the shortest distance is a straight line. :) (couldn't resist) $\endgroup$ – user5445 Feb 10 '16 at 16:30
  • $\begingroup$ You could transform the locations to spherical coordinates, then solve for the distance. $\endgroup$ – haresfur Feb 11 '16 at 2:12
12
$\begingroup$

If you don't want to do the calculation yourself, you can use an online calculator like the one provided by NOAA.

Alternatively, if you do want to do the calculation yourself you can use the haversine formula.

This uses the ‘haversine’ formula to calculate the great-circle distance between two points – that is, the shortest distance over the earth’s surface – giving an ‘as-the-crow-flies’ distance between the points (ignoring any hills they fly over, of course!).

$$a = \sin^2\left(\frac{\Delta\phi}{2}\right) + \cos \phi_1 ⋅ \cos \phi_2 ⋅ \sin^2\left(\frac{\Delta\lambda}{2}\right)$$

$$c = 2 ⋅ \text{atan2}( \sqrt a, \sqrt {1−a} )$$

$$d = R ⋅ c$$

where $\phi$ is latitude, $\lambda$ is longitude, $R$ is earth’s radius (mean radius = 6,371km)

$\endgroup$
  • 1
    $\begingroup$ This also ignores the earth's obliquity, right? For example, if you wanted to get from 0°E to 180°E on the equator, it would be shorter to go via the poles than via the equator, but this algorithm wouldn't tell you that. $\endgroup$ – naught101 Feb 11 '16 at 0:24
  • $\begingroup$ @naught101 Yes, you're correct. The haversine formula treats the earth as a sphere, not an ellipsoid. $\endgroup$ – mkennedy Feb 11 '16 at 18:50
8
$\begingroup$

45E is directly opposite 135W. It's therefore obvious (hopefully) that the shortest path is straight over the North pole (which is at 90 degrees North). The path takes us round 120 degrees of the Earth's circumference, or 1/3rd of it.

$\endgroup$
  • $\begingroup$ Nice. Not a general solution but probably why it was asked using those locations. $\endgroup$ – haresfur Feb 11 '16 at 2:13

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.