I've been struggling with orbit calculations for Mars' moons and satellites. My Phobos and Deimos orbits look correct - orbital velocity and radius seem to be accurate. But satellites with pronounced eccentricity and/or inclination don't seem to work at all.(adsbygoogle = window.adsbygoogle || []).push({});

What I do during each frame is:

1) Calculate a new True Anomaly (v) and use that for orbit angle.

2) Calculate an new orbit radius using r = a(1 - e^2) / (1 + e cos v).

3) Calculate x = r * cos(i) * sin(v);

4) Calculate y = r * sin(i) * -cos(v);

5) Calculate z = r * cos(i) * cos(v);

Orbital elements are from Horizons and/or Celestia. It's distressing because the moons and some satellites look fine and other satellites are way off.

Thanks in advance.

charon

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mars moon & satellite orbits problem

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**