From: Els on
I have two points on the surface of my ellipsoid. I calculated the distance between them with the Vincenty formula. But now I want to plot this distance on the ellipsoid distance as a line as well. For a sphere this is easy, but I do not know how to do it for an ellipsoid.
From: us on
"Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <hsp41n$28e$1(a)fred.mathworks.com>...
> I have two points on the surface of my ellipsoid. I calculated the distance between them with the Vincenty formula. But now I want to plot this distance on the ellipsoid distance as a line as well. For a sphere this is easy, but I do not know how to do it for an ellipsoid.

huh...
what's the difference - technically, not conceptually(?)...

help line; % <- will do it...

us
From: Mark Shore on
"Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <hsp41n$28e$1(a)fred.mathworks.com>...
> I have two points on the surface of my ellipsoid. I calculated the distance between them with the Vincenty formula. But now I want to plot this distance on the ellipsoid distance as a line as well. For a sphere this is easy, but I do not know how to do it for an ellipsoid.

This is likely to be a fairly difficult problem to solve exactly, and I can't offer help. But, if you are using an Earth model (with 1/f ~ 298.257) then for plotting purposes an arc on a sphere will be almost indistinguishable from the true arc on the ellipsoid.
From: Bruno Luong on
"Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <hsp5b0$3se$1(a)fred.mathworks.com>...
>
> @ us, plotting a line is not the difficulty here. It is the formula behind it, probably being an integral I am curious about.

To avoid confusion please don't call it a line, it's a geodesic.

Have you look more closely to Vincenty's paper? If he derives an analytical expression of the distance, it must have the formula for the path as well. I have a hard time to believe the distance formula comes alone.

Otherwise, I would suggest two numerical techniques:

1) try to use geodesic ode equation together with BVP4C(.)
2) Use for example a spline parametrization of your curve with the constraints forcing the knots to belong to the ellipsoid, and and minimize the length by optimization technique such as FMINCON.

Bruno
From: Mark Shore on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hsp6pr$g8d$1(a)fred.mathworks.com>...
> "Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <hsp5b0$3se$1(a)fred.mathworks.com>...
> >
> > @ us, plotting a line is not the difficulty here. It is the formula behind it, probably being an integral I am curious about.
>
> To avoid confusion please don't call it a line, it's a geodesic.
>
> Have you look more closely to Vincenty's paper? If he derives an analytical expression of the distance, it must have the formula for the path as well. I have a hard time to believe the distance formula comes alone.
>
> Otherwise, I would suggest two numerical techniques:
>
> 1) try to use geodesic ode equation together with BVP4C(.)
> 2) Use for example a spline parametrization of your curve with the constraints forcing the knots to belong to the ellipsoid, and and minimize the length by optimization technique such as FMINCON.
>
> Bruno

The Vincenty paper uses an iterative algorithm and it would be hard to extract intermediate points.

However, a more recent and accurate implementation of another algorithm can be found at http://sourceforge.net/projects/geographiclib/ or see specifically http://geographiclib.sourceforge.net/html/utilities.html#geod . Files iinclude C++ source code (not useful to me, but maybe to others), and the command line program includes the option of calculating the coordinates of intermediate points along the geodesic. Documentation could definitely be better.