Code covered by the BSD License  

Highlights from
A MATLAB Script for Terrestrial and Celestial Coordinate Conversion

A MATLAB Script for Terrestrial and Celestial Coordinate Conversion

by

 

MATLAB functions and script for performing terrestrial to/from celestial coordinate transformations.

anmp (a)
function w = anmp (a)

% normalize angle into the range -pi <= a < +pi.

% ported from NOVAS 3.0

%%%%%%%%%%%%%%%%%%%%%%%

w = mod(a, 2.0 * pi);

if (abs(w) >= pi)
    
    w = w - sign(a) * (2.0 * pi);
    
end

Contact us