This function solves the "forward geodesic problem," which is to compute the endpoint of a geodesic (shortest-distance) path on the ellipsoidal earth, given the start point, a path length, and a starting azimuth.
In response to a user request, this function numerically inverts the previously published VDIST function, which is contained within. (VDIST solves the "inverse geodesic problem" of computing the distance and azimuth between two known points, using Vincenty's 1975 algorithm.) Although numerically inverting VDIST is not a very efficient way to solve the forward problem, it provides a quick solution and also serves as an example of how to invert a function numerically in Matlab.
OTHER NOTES: The distance between essentially antipodal points on an ellipsoid is very sensitive to small deviations in azimuth, so such points should be avoided. (A warning is given.) For other cases, precision is set to about one part in 10^12. This function has been tested but no warranty is provided; use at your own risk. Written by Michael Kleder, April 2006.
Michael Kleder (2021). VDISTINV: Find the endpoint of a geodesic on the ellipsoidal earth (https://www.mathworks.com/matlabcentral/fileexchange/10821-vdistinv-find-the-endpoint-of-a-geodesic-on-the-ellipsoidal-earth), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!