Calculates the position of a celestial body as a vector using the center of the Sun as the origin. The result is expressed as a Cartesian vector in the J2000 equatorial system (the mean equator of the Earth at noon UTC on 1 January 2000).
Value
A list with elements:
- x
X coordinate in AU.
- y
Y coordinate in AU.
- z
Z coordinate in AU.
- time
Observation time as POSIXct.
Examples
time <- as.POSIXct("2025-02-19 22:10:12", tz = "UTC")
astro_helio_vector(astro_body[["MARS"]], time)
#> $x
#> [1] -1.094507
#>
#> $y
#> [1] 1.11158
#>
#> $z
#> [1] 0.5393855
#>
#> $time
#> [1] "2025-02-19 22:10:12 UTC"
#>