The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ConvertDegrees


Unit:SDL_math1
Class:None
Declaration:procedure ConvertDegrees (var deg, min, sec: double; InFormat, OutFormat: TDegreeFormat);

The procedure ConvertDegrees converts degrees, arc-minutes, and arc-seconds between various formats specified by the parameters InFormat and OutFormat. Depending on the conversion options the variable parameters deg, min, and sec have to contain certain values on input to the routine, and will return certain values after the execution of ConvertDegrees:

Expected input values:
InFormat = dfDeg dfDegMin dfDegMinSec
  deg...floating point number
min...ignored
sec...ignored
deg...integer
min...floating point number
sec...ignored
deg...integer
min...integer
sec...floating point number

 

Resulting output values:
OutFormat = dfDeg dfDegMin dfDegMinSec
  deg...DD.DDDD
min...0
sec...0
deg...DD
min...MM.MMMM
sec...0
deg...DD
min...MM
sec...SS.SSSS

Hint: The variable parameters min and sec must not contain invalid values (i.e. < 0, or > 60) when calling ConvertDegrees. In the case of invalid parameters an exception is generated.



Last Update: 2012-Oct-20