Convert the Compass direction labels to degrees.

cimis_compass_to_degrees(x)

Arguments

x

A vector of compass directions, i.e. the data item labels "DayWindNnw", "DayWindSse", etc. Recognized directions are North-northeast (NNE), East-northeast (ENE), East-southeast (ESE), South-southeast (SSE), South-southwest (SSW), West-southwest (WSW), West-northwest (WNW), and North-northwest (NNW).

Value

A numeric vector of degrees corresponding to the middle azimuth of the corresponding compass direction.

Examples

cimis_compass_to_degrees("day-wind-nne")
#> [1] 22.5
cimis_compass_to_degrees(c("SSE", "SSW", "wsw", "Wnw", "nnw"))
#> [1] 157.5 202.5 247.5 292.5 337.5