How to calculate the middlle coordinate/point on earth between two coordinates?

209 Views Asked by At

Good Afternoon. I need help for a component of my math IA. I need to calculate the middle point between two coordinates on earth to make calculations based on this. I (stupidly) attempted to use the midpoint formula (for a 2d plane) (xM,Ym= (x1+x2)/2, (y1+y2)/2). However, this ignores the fact that the earth is round (as I was told by my teacher) I used the 12.458467°, -71.664728° format to use this formula.

How can I calculate the middle point in coordinates between two points on earth? [e.g. Middle point/coordinate between 12.458467°, -71.664728° and -53.896306°, -71.294314°].

1

There are 1 best solutions below

0
On

What you could do is this:

  1. Calculate the 3D coordinates (x,y,z) of the two points. You can use 1 for the radius of the earth.
  2. Take the midpoint between them. This is the midpoint of the straight line between them, so will be a point inside the earth, but it lies directly below the spot on the surface that you want.
  3. Scale the coordinates to get that epicentre surface point. It is at distance 1 from the origin.
  4. Calculate the longitute/latitude of the point.