Skip to contents

This function converts DMS (degree-minute-second) to decimal degrees. The input DMS values must be in the format of "DDDMMSSsss" where:

  • D: Degrees (1–3 digits)

  • M: Minutes (2 digits)

  • S: Seconds (2 digits)

  • s: Milliseconds (3 digits)

Usage

convert_deg(dms)

Arguments

dms

A numeric vector of DMS values in the format of "DDDMMSSsss"

Value

A numeric vector of decimal degrees.

Examples

convert_deg(c("431007628", "1410328320"))
#> [1]  43.16879 141.05787
convert_deg(c(431007628, 1410328320))
#> [1]  43.16879 141.05787