Even's suggestion (compute the geodesics on a height adjusted ellipsoid) is probably as good as you're going to get for now. There has been some work on the restricted version of this problem, computing geodesics on a surface of constant height above the ellipsoid. See
Richard J. Mathar Geodetic Line at Constant Altitude above the Ellipsoid https://arxiv.org/abs/0711.0642 I toyed with the idea of implementing a bullet-proof solution of thie problem, but I have other irons in the fire at present. On Wed, Aug 28, 2024 at 6:04 AM Even Rouault via PROJ <[email protected]> wrote: > > 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 ... > > Le 28/08/2024 à 01:36, Even Rouault via PROJ a écrit : > > Nyall, > > > > I'm not sure there's a real definition to what you want to accomplish. > > > > I guess I would : > > > > - use the geod_position() of geodesic.h to compute a sufficient number > > of intermediate positions > > > > - linearly interpolate the ellipsoidal height > > > > - convert the resulting (lon, lat, h) to geocentric (X, Y, Z) using > > +proj=cart > > > > - use 3D Cartesian distance to compute each intermediate segment > > > > - sum them up > > > > A cheaper alternative might be to compute the geodesic distance > > between the start and end points both on the ellipsoid (a + h_start, b > > + h_start) and on the one (a + h_end, b + h_end), and compute some > > sort of mean (arithmetic, geometry, ... ?) on those 2 distances. > > > > Even > > > > > > Le 28/08/2024 à 01:06, Nyall Dawson via PROJ a écrit : > >> Hi list, > >> > >> Let's say I have two points on an ellipsoid, with each point having a > >> different height above the ellipsoid. I want to calculate a kind of > >> "geodesic" between these points, where there's an assumption that the > >> gradient of the height-above-ellipsoid for the "geodesic" is constant. > >> > >> Is this mathematically solvable? Or, more to the point, is it possible > >> to calculate this using any of the methods exposed via geodesic.h? > >> > >> Nyall _______________________________________________ PROJ mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/proj
