[Proj] Program Geod

Gerald I. Evenden geraldi.evenden at gmail.com
Tue Mar 17 16:23:39 EST 2009

On Tuesday 17 March 2009 5:11:47 pm Karney, Charles wrote:
> > I noticed a factor with Karney's geodesic program Geod where the
> > azimuth of the geodesic at point 2, usually referred to as the "back
> > azimuth", pointed away from the first point.  That is, it is off by
> > Pi.
> The documentation of the Geodesic class specifies
>     'azi2 is the "forward" azimuth, i.e., the heading that takes you
>     beyond point 2 not back to point 1.'
> I'll fix it so that the help printed with Geod -h includes this
> definition.
> I'm in good company using the forward azimuth at the second point.  This
> is the convention used by Rainsford, Vincenty, and Rapp.  I prefer this
> choice because when solving the direct problem with a negative distance,
> the meaning of both azi1 and azi2 remain the same (they are the heading
> in the +s direction).

Interesting that the company that paid for Vincente's work uses the standard I 
am used to on the NGS online computer.

I only use the logic that if I turn the points around, the output should 
mirror the operation.  Continuing the forward azimuth does not do that.

> If you want to change the output, then edit Geod.cpp, changing
>    AzimuthString(azi2, prec, dms);
> to
>    AzimuthString(azi2 + 180, prec, dms);
> wherever it occurs.  (AzimuthString folds the result to [0,360).)
> --
> Charles Karney <ckarney at sarnoff.com>
> Sarnoff Corporation, Princeton, NJ 08543-5300
> URL: http://charles.karney.info
> Tel: +1 609 734 2312
> Fax: +1 609 734 2662

The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist

More information about the Proj mailing list