# 2D circular with elliptical orbit interference

This topic is 1091 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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).

##### Share on other sites

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

Edited by h4tt3n

##### Share on other sites

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.

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633724
• Total Posts
3013556
×