Learn R Programming

astronomyengine (version 0.1.0)

astro_bary_state: Barycentric position and velocity vectors

Description

Calculates the barycentric (solar system barycenter) position and velocity vectors for a given celestial body at a specified time.

Usage

astro_bary_state(body, time)

Value

A list with elements:

x

X position in AU.

y

Y position in AU.

z

Z position in AU.

vx

X velocity in AU/day.

vy

Y velocity in AU/day.

vz

Z velocity in AU/day.

time

Observation time as POSIXct.

Arguments

body

Identifier of celestial body (e.g., astro_body["MERCURY"]).

time

A POSIXct time value.

Details

The vectors are expressed in J2000 mean equator coordinates (the mean equator of the Earth at noon UTC on 1 January 2000).

Examples

Run this code
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