I'm making a space exploration game. It will all take place within a single 2D plane (no inclination) and use patched-conics approximation so that a spacecraft is only gravitationally affected by one celestial body at a time. I have orbit simulations working perfectly given a set of parameters. These are the variables that orbits have in the program:
- semi-major axis (meters)
- argument of periapsis (radians)
- whether the orbit is prograde or retrograde
- standard gravitational parameter of the celestial body being orbited (m^3 s^-2)
- the eccentric anomaly at t = 0 (radians)
And an object's current position is stored as its current eccentric anomaly in radians. Using these six parameters, I can define any elliptical orbit in the plane, and get the position and velocity of the object for any given time or eccentric anomaly.
What I can't do yet is make the orbit change based on the spacecraft's acceleration. Given a current eccentric anomaly, all six orbital parameters for an object, and a 2D vector for change in velocity, how can I compute the new orbital parameters?