powered by
This function transforms a vector in one orientation to a vector in another orientation.
astro_rotate_vector(rotation, vector)
A vector in the orientation specified by rotation
rotation
A rotation matrix that specifies how the orientation of the vector is to be changed
The vector whose orientation is to be changed. A list with components:
The Cartesian x-coordinate in AU
The Cartesian y-coordinate in AU
The Cartesian z-coordinate in AU
The date and time (POSIXct) at which this vector is valid
# Create a vector and rotate it vec <- list(x = 1, y = 0, z = 0, t = as.POSIXct("2024-01-01", tz = "UTC")) rot <- astro_identity_matrix() rotated <- astro_rotate_vector(rot, vec)
Run the code above in your browser using DataLab