Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  TEN

TEN

TEN

Name


TEN()

Purpose


Converts a sexagesimal number or string to decimal.

Explanation


Inverse of the SIXTY() function.

Calling Sequences


X = TEN( [ HOUR_OR_DEG, MIN, SEC ] )
X = TEN( HOUR_OR_DEG, MIN, SEC )
X = TEN( [ HOUR_OR_DEG, MIN ] )
X = TEN( HOUR_OR_DEG, MIN )
X = TEN( [ HOUR_OR_DEG ] ) <-- Trivial cases
X = TEN( HOUR_OR_DEG ) <--
        or
      X = TEN(HRMNSC_STRING)

Inputs


HOUR_OR_DEG,MIN,SEC -- Scalars giving sexagesimal quantity in
in order from largest to smallest.
                        or
      HRMNSC_STRING - String giving sexagesmal quantity separated by
              spaces or colons e.g. "10 23 34" or "-3:23:45.2"
              Any negative values should begin with a minus sign.

Outputs


Function value returned = double real scalar, decimal equivalent of
input sexigesimal quantity. A minus sign on any nonzero element
of the input vector causes all the elements to be taken as
< 0.

Examples


      IDL> print,ten(0,-23,34)
                --> -0.39277778
      IDL> print,ten("-0:23:34")
                --> -0.39277778

Procedure


Mostly involves checking arguments and setting the sign.
The procedure TENV can be used when dealing with a vector of
sexigesimal quantities.

Modification History


Written by R. S. Hill, STX, 21 April 87
Modified to allow non-vector arguments. RSH, STX, 19-OCT-87
      Recognize -0.0 W. Landsman/B. Stecklum Dec 2005
      Work with string input W. Landsman Dec 2008



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us