Sunday, April 25, 2010

Orbit simulator

Reading Neal Stephenson's Anathem got me interested in orbital mechanics. It's a little non-intuitive. If you are trying to dock with a space station, and it's ahead of you in orbit, you need to slow down (fire thrusters opposite the direction you are going, or retrograde.) This puts you in a slightly lower orbit which has a shorter period, so you speed up your angular velocity. Kind of like running on the inside lane around a track. If the station is behind, then speed up to let it catch up.

So I studied the equations and came up with an orbital simulator where you chase a station with your ship and see how close you can get, by firing thrusters to speed up or slow down. By matching the orbital elements, you close in on the station.

A couple of other tips: to get to a circular orbit, get the eccentricity close to zero. Do this by firing thrusters prograde (in the direction you are going) near the hollow square which is apoapsis. This is when you are farthest from the earth (or whatever planet you want the blue circle to be.) Or fire retrograde near the solid square which is periapsis, when you are closest to the earth.

Try to match the period and radius of the station. I still need to add some help on the other elements shown, but they are less crucial. You can also just practice "flying" and see what changing speed at various points does to the orbit. The blue circle planet is virtual, so you'll pass right through instead of crashing or burning up in the atmosphere. Try not to fly off the screen though.

The simulation is here and runs on Java:

http://users.wowway.com/~jrlivermore/orbit/orbitpage.htm

No comments:

Post a Comment