powered by
Calculates the barycentric (solar system barycenter) position and velocity vectors for a given celestial body at a specified time.
astro_bary_state(body, time)
A list with elements:
X position in AU.
Y position in AU.
Z position in AU.
X velocity in AU/day.
Y velocity in AU/day.
Z velocity in AU/day.
Observation time as POSIXct.
Identifier of celestial body (e.g., astro_body["MERCURY"]).
astro_body["MERCURY"]
A POSIXct time value.
The vectors are expressed in J2000 mean equator coordinates (the mean equator of the Earth at noon UTC on 1 January 2000).
time <- as.POSIXct("2025-02-19 22:10:12", tz = "UTC") astro_bary_state(astro_body["MARS"], time)
Run the code above in your browser using DataLab