Jump to content
  • Advertisement
Sign in to follow this  
Flopper123

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement

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 this post


Link to post
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.

 

Thanks for the reply, Thomas

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!