<< dat_leapseconds Utilities format_linevec >>

scilib_geo >> Utilities > deg2dms

deg2dms

Converts the given Value to degrees, minutes and seconds

Calling Sequence

[dms, dmsvec] = deg2dms(deg[, flag])

Parameters

deg

Scalar or vector [decimal degree]

flag

set to 's' to return a formated string [degree°minutes'seconds''] , default='', optional

dms

Scalar or vector of return values [DD.MMSSss], or formated string or vector of formated strings following the form [DD°MM'SS.ss'']

dmgvec

Separated values [DD, MM, SS.ss]

Description

Formates the given skalar or vector of values in decimal degrees to the common form [DD,MMSSss]. dms can optionaly be returned as formated string (flag='s') "GG°MM'SS.ss". The additional return value dmsvec containes the separated values as line vector [Degree, Minutes, Seconds.decimalseconds].

Examples

deg2dms(270.45)
deg2dms(270.45, 's')

Authors


Report an issue
<< dat_leapseconds Utilities format_linevec >>