Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I have a question/doubt/general-lack-of-understanding here:

I have a simulated solar system here, with simplified orbital mechanics. The main simplification is that at any one time, only one celestial body exerts gravitational forces on the spaceship.

So, my problem is: What would be the most correct way to determine when to switch dominant bodies?

Currently, what I'm doing is running through all of them, and calculating the gravity acceleration vector for each body, based on the inverse-square relation of G force magnitude and distance.

Then, I apply the greatest force I've found, and set the body from which it came as the dominant one.

I thought this would be a good approximation, but it seems this method doesn't quite match the calculations of the body's own sphere of influence, or it's hill sphere, or any obvious multiple or fraction of those radii...

So I decided it's about time I asked for help on this. ;)

The way I see it, I either need to figure out a better rule for determining the dominant body, or find a way to correctly calculate the point of the switchover.

Also, I have in this same simulation an osculating orbit solver, that is used to predict (and also propagate) the orbits of all objects in the system. Now that I started thinking about this, I've seen closed orbits that lead to outside the sphere of influence of the central body... Is that correct? Shouldn't any orbit that has a higher Apoapsis than the sphere of influence be hyperbolic or parabolic? Or are those concepts unrelated?

So, any help at this point will be greatly appreciated.

As always, thanks in advance!

Cheers

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

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

# Determining the dominant body in a basic planetary system simulation

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