Advertisement

2D circular with elliptical orbit interference

Started by December 20, 2015 12:57 PM
1 comment, last by Flopper123 9 years, 1 month ago

Given 2 object (a spaceship and a planet), which are both orbiting the same sun. I have the spaceships position and velocity (and therefore also it's elliptical curve equation). And for the planet I know it's constant velocity, and it's constant distance from the sun (so therefore I know it's exact position at a given time). Is there a way to check, if the two object are going to interfere (basically collide with each other)?

Since it's a space simulator, where I calculate real gravity, my spaceship will accelerate when I fly towards the perigee. I only want to check for collision within the next orbit (Kerbal like).

How deep have you dug into orbital mechanics yet? Do you know how to compute state vectors from orbital elements and vice versa? Do you know how to derive mean, eccentric and true anomalies from each other? You'll need a function that computes the position of each body as a function of time. A simple solution would be to then iterate forward with a time step defined as a fraction of the smallest of the two orbital periods. Rather than checking for direct collision, you could check if the ship enters the planets Hill sphere or sphere of influence, inside which its trajectory could be altered a lot.

Cheers Mike

Advertisement

Hi Mike.

I have already calculated the eccentrics and everything, since that I have calculate the elliptic path that the spaceship will go.

Sorry for not to mention it before, but I've already calculated the path in small iterations before, but the result got WAY too unprecise, and when I tried to make more itterations pr distance, I takes FAR too long time to calculate.

Thanks for the reply, Thomas

This topic is closed to new replies.

Advertisement