R/dms2dec.R

# Degree Minutes Seconds (DMS) to Degree Decimal (DD)
dms2dec = function(coord)
{
	out = sapply(coord,
			function(coord)
			{
				crd = coord_clean(coord)
				
				signal = sign(crd[1])
				crd = abs(crd)
				
				out  = signal * (crd[1] + crd[2]/60 + crd[3]/3600)
			}#end function 
	)#end sapply
	
	return(out)
}#end dms2dec
salah31416/toolbox documentation built on June 3, 2019, 6:59 p.m.