<p><a href="https://rhodesmill.org/skyfield/" rel="nofollow noreferrer">Skyfield</a> is the successor to <a href="https://rhodesmill.org/pyephem/" rel="nofollow noreferrer">PyEphem</a> (note that they are supported by the <a href="https://astronomy.stackexchange.com/users/10483/brandon-rhodes">same person</a>) and it is location agnostic as far as solar system bodies are concerned.</p>
<p><em>However</em> to my knowledge, there is no equivalent for it's support of artificial <a href="https://rhodesmill.org/skyfield/earth-satellites.html" rel="nofollow noreferrer">Earth satellites</a> which it supports via an implementation of the geocentric <a href="https://en.wikipedia.org/wiki/Simplified_perturbations_models" rel="nofollow noreferrer">SGP4</a> propagation of <a href="https://en.wikipedia.org/wiki/Two-line_element_set" rel="nofollow noreferrer">Two Line Element Sets</a>.</p>
<p>That means that in the future, if you have an observatory on the Martian surface and you want to calculate when Elon Musk's &quot;Starlink, Mars Edition&quot; satellites will ruin your science, you'll have to hope that this functionality has been added.</p>
<hr />
<p>related and/or potentially helpful</p>
<ul>
<li><a href="https://astronomy.stackexchange.com/q/35938/7982">Is there an online planetarium where the observer is on another celestial body?</a></li>
<li><a href="https://astronomy.stackexchange.com/q/13488/7982">Where can I find the positions of the planets, stars, moons, artificial satellites, etc. and visualize them?</a></li>
<li><a href="https://astronomy.stackexchange.com/q/26166/7982">How will planets behave in the night sky as seen by Mars colonists?</a></li>
</ul>

CC BY-SA 4.0
2024-07-01T06:41:17.693Z
2024-07-01T06:41:17.693Z
uhoh
<p>The python pyephem library is great... if you are on Earth.   Has anyone built one if you were living on Mars?  A search on this turns up the ephemeris <em>of</em> Mars many times, but not something that could tell you the location of the moons of Mars as seen <em>on</em> Mars, given your location <em>on</em> Mars, or the location of the planets, the Sun, or Earth.</p>

CC BY-SA 4.0
2024-06-30T14:48:46.943Z
There are SPICE kernels that have the orientation data for other planets and some small bodies.  Any software that can use them can do what you ask, I believe PyEphem will, also SpiceyPy can.  The most useful one is pck00011.tpc at the link below, though there is a specific one for Mars. They are plain text files, so you can read about what's in them by opening them in a text editor. https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/
Greg Miller
CC BY-SA 4.0
2024-07-01T05:30:32.887Z
There are even [site ID numbers for 10 Mars landing sites](https://ssd.jpl.nasa.gov/api/horizons.api?format=text&OBJ_DATA=NO&MAKE_EPHEM=YES&COMMAND=0&CENTER=%27%2A%40499%27) so you don't need to bother with entering coordinates. Eg, here's some Sun azimuth & elevation data for the Perseverance site: https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND=10&CENTER=9%40499&QUANTITIES=4&START_TIME=%272024-Jul-1+6%3A00%27&STOP_TIME=%272024-Jul-1+22%3A00%27&STEP_SIZE=1h
PM 2Ring
<mars><python><ephemeris>
Pyephem equivalent when living on Mars?
asylumax
# Pyephem equivalent when living on Mars?

(Asked by: username_0 on 2024-06-30)

The python pyephem library is great... if you are on Earth. Has anyone built one if you were living on Mars? A search on this turns up the ephemeris *of* Mars many times, but not something that could tell you the location of the moons of Mars as seen *on* Mars, given your location *on* Mars, or the location of the planets, the Sun, or Earth.

**Tags:** mars, python, ephemeris

> **Comments:**
> **username_1**: There are SPICE kernels that have the orientation data for other planets and some small bodies.  Any software that can use them can do what you ask, I believe PyEphem will, also SpiceyPy can.  The most useful one is pck00011.tpc at the link below, though there is a specific one for Mars. They are plain text files, so you can read about what's in them by opening them in a text editor. https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/  
> **username_2**: There are even [site ID numbers for 10 Mars landing sites](https://ssd.jpl.nasa.gov/api/horizons.api?format=text&OBJ_DATA=NO&MAKE_EPHEM=YES&COMMAND=0&CENTER=%27%2A%40499%27) so you don't need to bother with entering coordinates. Eg, here's some Sun azimuth & elevation data for the Perseverance site: https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND=10&CENTER=9%40499&QUANTITIES=4&START_TIME=%272024-Jul-1+6%3A00%27&STOP_TIME=%272024-Jul-1+22%3A00%27&STEP_SIZE=1h  

---

## 1 answers

### Answer by username_3 on 2024-07-01. Score: 3

[Skyfield](https://rhodesmill.org/skyfield/) is the successor to [PyEphem](https://rhodesmill.org/pyephem/) (note that they are supported by the [same person](https://astronomy.stackexchange.com/users/10483/brandon-rhodes)) and it is location agnostic as far as solar system bodies are concerned.

*However* to my knowledge, there is no equivalent for it's support of artificial [Earth satellites](https://rhodesmill.org/skyfield/earth-satellites.html) which it supports via an implementation of the geocentric [SGP4](https://en.wikipedia.org/wiki/Simplified_perturbations_models) propagation of [Two Line Element Sets](https://en.wikipedia.org/wiki/Two-line_element_set).

That means that in the future, if you have an observatory on the Martian surface and you want to calculate when Elon Musk's "Starlink, Mars Edition" satellites will ruin your science, you'll have to hope that this functionality has been added.

---

related and/or potentially helpful

* [Is there an online planetarium where the observer is on another celestial body?](https://astronomy.stackexchange.com/q/35938/7982)
* [Where can I find the positions of the planets, stars, moons, artificial satellites, etc. and visualize them?](https://astronomy.stackexchange.com/q/13488/7982)
* [How will planets behave in the night sky as seen by Mars colonists?](https://astronomy.stackexchange.com/q/26166/7982)


---

