Function File: degrees2dm (deg)

Convert decimal degrees to its degrees and minutes components.

Separates the fractional part of an angle in decimal degrees and converts it into minutes. Each row of the output corresponds to one angle, the first column to the degree component (an integer), and the second to the minutes (which may have a fractional part).

degrees2dm (10 + 20/60)
⇒  [ 10   20 ]

degrees2dm (10 + pi)
⇒  [ 10   8.4956 ]

The sign of the first non-zero component indicates the sign of the angle, i.e., if the degree component is zero, the sign of the minutes indicates the sign of the angle, but if the degree component is non-zero, the minute component will be positive independently of the sign of the angle. For example:

angles = [  10.5
           -10.5
            -0.5
             0.5 ];
degrees2dm (angless)
  ⇒
         10   30
        -10   30
         -0  -30
          0   30

See also: degrees2dms, dm2degrees, dms2degrees.

Package: mapping