[PROJ] Ellipsoidal distances, with different heights
Greg Troxel
gdt at lexort.com
Wed Aug 28 04:00:51 PDT 2024
Even Rouault via PROJ <proj at lists.osgeo.org> writes:
> Or even simpler, compute geodesic distance on ellipsoid (a + h_mean, b
> + h_mean) where h_mean is the mean of h_start and h_end. If h_start
> and h_end are small compared to a, I would expect whatever mean
> formula used to lead to similar results. At least this method is
> guaranteed to give the correct result when h_start = h_end = 0 ...
Or go full Pythagoras
(geodesic_distance)^2 + (h_start-h_end)^2)^1/2
so you don't need the horiz >> vertical assumption. Bonus points for
someone who can do the integrals and see if that's right or not, and if
not, if they can find a closed-form solution.
Stepping back, I would ask what semantics you want and why they make
sense.
In 3D, the shortest distance between 2 points is a line in 3d, which
when converted back to llh, has h dropping in between. A geodesic is
the shortest distance constrained to the ellipsoid. That's longer than
the shortest 3d line. But it makes sense if you are navigation at h=0
(or H=0, more likely!, or H "small", constrained to topography).
You're asking for a shortest distance that's sort of constrained to the
ellipsoid but not entirely. Intuitively I can see the point of your
smooth change goal.
More information about the PROJ
mailing list