A simple coordinate converter, intended to be a relatively simple first program to write in the Go language.
To convert a degrees-minutes-seconds or DMS coordinate of 30° 15' 50" N to it's decimal degree equivalent.
ConvertDmsToDd(30, 15, 50, North)
returns 30.26388888888889
To convert a degrees-minutes-seconds or DMS coordinate of 57° 45' 02" E to it's decimal degree equivalent.
ConvertDmsToDd(57, 45, 02, East)
returns 57.75055555555556
To convert a degrees-minutes-seconds or DMS coordinate of 63° 19' 15" S to it's decimal degree equivalent.
ConvertDmsToDd(63, 19, 15, South)
returns -63.32083333333334
To convert a degrees-minutes-seconds or DMS coordinate of 57° 45' 02" W to it's decimal degree equivalent.
ConvertDmsToDd(57, 45, 02, West)
returns -57.75055555555556
go test