# ari2geodeg

## PURPOSE

ARI2GEODEG converts arithmetic angles to geographic angles.

## SYNOPSIS

function [geoAng] = ari2geodeg(ariAng)

## DESCRIPTION

    ARI2GEODEG converts arithmetic angles to geographic angles.
     ariAng is a scalar, vector, or matrix of angles in degrees,
     such as those produced with atan() or atan2().
     geoAng is an output of size(ariAng) with angles converted to
     geographic headings (North = 0, with angles positive
     clockwise)

     EXAMPLE USAGE
       ariAng = 150
       [geoAng] = mcsADCP.ari2geodeg(ariAng)
       geoAng =

       300

     Frank L. Engel, USGS

     SEE ALSO: mcsADCP, geo2arideg

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function [geoAng] = ari2geodeg(ariAng)
    0002 %ARI2GEODEG converts arithmetic angles to geographic angles.
    0003 % ariAng is a scalar, vector, or matrix of angles in degrees,
    0004 % such as those produced with atan() or atan2().
    0005 % geoAng is an output of size(ariAng) with angles converted to
    0006 % geographic headings (North = 0, with angles positive
    0007 % clockwise)
    0008 %
    0009 % EXAMPLE USAGE
    0010 %   ariAng = 150
    0011 %   [geoAng] = mcsADCP.ari2geodeg(ariAng)
    0012 %   geoAng =
    0013 %
    0014 %   300
    0015 %
    0016 % Frank L. Engel, USGS
    0017 %
    0018 % SEE ALSO: mcsADCP, geo2arideg
    0019
    0020
    0021 ariAng(ariAng<0) = ariAng(ariAng<0) + 360;
    0022 ariAng = ariAng + 270;
    0023 ariAng(ariAng>360) = ariAng(ariAng>360)-360;
    0024 geoAng = 360-ariAng;
    0025 end % function ari2geodeg