petronius / delta-v

Two-body orbit simulator, with ambitions to be a game, Dwarf Fortress meets "Balance of Terror" (WIP)
0 stars 0 forks source link

Broken orbit rendering #8

Open petronius opened 8 years ago

petronius commented 8 years ago

Orbit.from_true_anomaly() will return a v_position with a flipped sign on the y axis in many cases. This likely due to calculating the eccentric anomaly from arctan() (and not arctan2, thus the angle ending up in the wrong quadrant), but I am not sure.

This is only a problem with the orbit plotting code, though, and doesn't affect actual spaceship movement.

petronius commented 8 years ago

Could also be related to the rendering of the orbit. Under certain cases broken orbits appear to rotate the camera when the focus isn't on the origin.