.. Using Keplerian Elements(adsbygoogle = window.adsbygoogle || []).push({});

Hi. Disclaimer: this is the first foray into orbits I've ever taken. I only did mechanics in university and haven't really touched it sincew.

I'm busy coding a simulation of a solar system. I've managed to code a routine to calculate the position of a body along an elliptic orbit, using a wikipedia article, but the code breaks down when the eccentricity of the orbit approaches or passes 1.0. Specifically, the true anomaly goes to π and the radius goes to ∞ pretty much immediately when the eccentricity is 1.0; when the eccentricity is >1.0, the true anomaly goes to ∞ too.

So, I'm looking for a little help with an algorithm to calculate points on a parabolic orbit, or on a hyperbolic orbit, using the same parameters like semimajor axis and eccentricity. From what I can see, mean/eccentric/true anomalies don't make sense for parabolic and hyperbolic orbits.

I'll take whatever help you can lend, and I don't need anyone to code me a solution, but I'm specifically looking to calculate the coordinates of a point on the orbit with respect to time.

Thanks for your help!

If you're curious, here's the code:

where solveForEccenticAnomaly solves M=E-e*sin(E).Code (Text):

float meanAnomaly=(2.0f*pi*age)/(period)+meanAnomalyAtEpoch,

eccentricAnomaly=solveForEccentricAnomaly(meanAnomaly, eccentricity),

trueAnomaly=2.0f*atan2f(sqrt(1.0f+eccentricity)*sin(eccentricAnomaly/2.0f),

sqrt(1.0f-eccentricity)*cos(eccentricAnomaly/2.0f)),

radius=semiMajorAxis*(1.0f-(eccentricity*eccentricity))/(1+eccentricity*cos(trueAnomaly));

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

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

# Position of a Body on a Hyperbolic/Parabolic Orbit with Respect to Time

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