Point along great circle line (aka arc) closest to a target point on the ground

232 Views Asked by At

Given:

  • an arc (aka a great circle line, not a straight-line) defined by two arbitrary end points (which I can express in lat/lon/altitude or earth-centered fixed (ECF) 3D 'cartesian' space). Think of this as the flight path of a plane (altitudes can change from the beginning of the arc to the end).
  • an arbitrary point (call it 'target') on earth's surface (again, expressible in lat/lon/alt or ECF).

How can I find the point along the arc that is closest to 'target'? Note that altitude/z should be accounted for, only the 'target' is guaranteed to be on the ground.

I'm grateful for any replies. Solutions based on vectors or well-explained solutions that leverage quaternions are preferred, but at this point any solution will work! I have googled this ad naseum and keep finding straight-line solutions but no arc (great-circle line) solutions.

Thanks from Florida!

1

There are 1 best solutions below

2
On

I think what follows is pretty geometrically intuitive, but if you need some more explanation I can try and go for it.

Let $T$ be the target point and $\gamma$ the arc. Consider an arc $\beta$ through $T$ that is perpendicular to $\gamma$. Then the point in $\gamma$ closest to $T$ lies in the intersection of $\gamma$ with $\beta$.

Notice that the solution need not always be unique (consider for example, the north pole and an arc in the equator).

EDIT: I misread it and did not consider varying altitues, so this does not completely address the question, but for the moment I will leave it as is. The bit about solutions not being unique still holds of course.