Lengths and Angles

Convert between different angle and length units and perform longitude wrapping


deg2rad Convert angle from degrees to radians
rad2deg Convert angle from radians to degrees
degrees2dm Convert degrees to degrees-minutes
degrees2dms Convert degrees to degrees-minutes-seconds
dm2degrees Convert degrees-minutes to degrees
dms2degrees Convert degrees-minutes-seconds to degrees
toDegrees Convert angles to degrees
toRadians Convert angles to radians
fromDegrees Convert angles from degrees
fromRadians Convert angles from radians
km2nm Convert kilometers to nautical miles
km2sm Convert kilometers to statute miles
nm2km Convert nautical miles to kilometers
nm2sm Convert nautical to statute miles
sm2km Convert statute miles to kilometers
sm2nm Convert statute to nautical miles
wrapTo180 Wrap angle in degrees to [-180 180]
wrapTo360 Wrap angle in degrees to [0 360]
wrapToPi Wrap angle in radians to [−pi pi]
wrapTo2Pi Wrap angle in radians to [0 2*pi]
unwrapMultipart Unwrap vector of angles with NaN-delimited parts
str2angle Convert strings to angles in degrees
map.geodesy.isdegree True if string matchesdegree and false if radian
validateLengthUnit Validate and standardize length unit string
unitsratio Unit conversion factors
Was this topic helpful?