[Pkg-octave-devel] Bug#415341: octave-forge: azimuth.m gives
incorrect values
Rafael Laboissiere
rafael at debian.org
Sun Mar 18 22:25:52 CET 2007
package octave-forge
tags 415341 upstream
thanks
* Tom Wright <tew24 at esc.cam.ac.uk> [2007-03-18 15:56]:
> The calculation in mapping/azimuth.m in both the 2.1 and 2.9 branches of
> octave-forge gives incorrect values. A correct version of the
> calculation is given at http://williams.best.vwh.net/avform.htm#Crs
>
> Instead of the current calculation:
> < az = rad2deg(acot((sin(a) * cot(b) - cos(a) * cos(C)) / \
> < sin(C)));
>
> the calculation should be:
> > az=rad2deg(mod(atan2(sin(C)*sin(b), \
> > sin(a)*cos(b)-cos(a)*sin(b)*cos(C)),\
> > 2*pi));
>
There is a new version of azimut.m in the CVS repository of octave-forge [1].
Could you please check if that version does the correct calculation?
[1] http://octave.cvs.sourceforge.net/octave/octave-forge/extra/mapping/inst/azimuth.m?revision=1.2
--
Rafael
More information about the Pkg-octave-devel
mailing list