# 30° altitude, facing south
hor <- list(lat = 30, lon = 180, dist = 1)
time <- as.POSIXct("2024-01-01 12:00:00", tz = "UTC")
vec <- astro_vector_from_horizon(hor, time, refraction = 1)
# Convert horizontal coordinates to vector
sphere <- list(lat = 45, lon = 90, dist = 1) # 45° altitude, 90° azimuth (east)
time <- as.POSIXct("2024-01-01 12:00:00", tz = "UTC")
vec <- astro_vector_from_horizon(sphere, time, refraction = 1)
Run the code above in your browser using DataLab