# Getting ephemeris data in heliocentric coordinates

**URL:** <https://community.wolfram.com/t/getting-ephemeris-data-in-heliocentric-coordinates/24337>\
**Category:** Questions\
**Tags:** data-science, earth-science, curated-data\
**Created:** [July 18, 2024, 11:37pm UTC](https://community.wolfram.com/t/getting-ephemeris-data-in-heliocentric-coordinates/24337 "2024-07-18T23:37:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghazelrigg](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@ghazelrigg](https://community.wolfram.com/u/ghazelrigg)\
**Post date:** [July 18, 2024, 11:37pm UTC](https://community.wolfram.com/t/getting-ephemeris-data-in-heliocentric-coordinates/24337/1 "2024-07-18T23:37:00Z")

</div>

I am trying to use the JPL Horizons Ephemeris database to determine planetary positions and velocities in heliocentric coordinates. My code is:

```
ResourceFunction[
  "HorizonsEphemerisData"]["State", {Entity["Planet", "Earth"], <|
   "Dates" -> {DateObject[{2024, 4, 19}],
     DateObject[{2024, 7, 19 + 20}],
     Quantity[10, "Days"]}|>}, All, "Dataset", {"Position",
  "Velocity"}]

```

But this does not return data in heliocentric coordinates. Can anyone please suggest how I can get the position and velocity in heliocentric coordinates?

---

<div class="post-metadata">

**Author:** ![ghazelrigg](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@ghazelrigg](https://community.wolfram.com/u/ghazelrigg)\
**Post date:** [July 19, 2024, 9:02pm UTC](https://community.wolfram.com/t/getting-ephemeris-data-in-heliocentric-coordinates/24337/2 "2024-07-19T21:02:37Z")

</div>

Problem solved.

```
ResourceFunction["HorizonsEphemerisData"]["State", <|
  "Target" -> Entity["Planet", "Earth"], "Center" -> "@0",
  "Dates" -> {DateObject[{2024, 7, 19}],
    DateObject[{2024, 7, 19}] + Quantity[12, "Days"],
    Quantity[1, "Days"]}|>, {"Position", "Velocity"}, "Dataset"]

```

Must specify the “Center” as “@0”. Had to look this up in the NASA documents on the Horizons database. I could not find any documentation on this by Mathematica.
