I came across the following algorithm to calculate the cartezian vectors from the orbital elements:
First calculate some coefficients that will be used in determining the position: $$ r_x' = a (\cos E - \varepsilon)\\ r_y' = b \sin E\\ $$
Then calculate coefficients for the velocity: $$ \dot{\varepsilon} = \sqrt{\frac{\mu}{ar}}\\ v_x' = -a\dot{\varepsilon}\sin E\\ v_y' = b\dot{\varepsilon}\cos E $$
Finally, what appears to be some common coordinates for position and velocity: $$ p_x = \cos\omega \cos\Omega - \sin\Omega \sin\omega \cos i\\ p_y = \cos\omega \sin\Omega + \cos\Omega \sin\omega \cos i\\ p_z = \sin\omega \sin i\\ q_x = -\sin\omega \cos\Omega - \sin\Omega \cos\omega \cos i\\ q_y = -\sin\omega \sin\Omega + \cos\Omega \cos\omega \cos i\\ q_z = \cos\omega \sin i $$
Finally, position and velocity are calculated: $$ r_x = r_x'p_x + r_y'q_x\\ r_y = r_x'p_y + r_y'q_y\\ r_z = r_x'p_z + r_y'q_z\\ v_x = v_x'p_x + v_y'q_x\\ v_y = v_x'p_y + v_y'q_y\\ v_z = v_x'p_z + v_y'q_z $$
Where:
- $a$ and $b$ are the semi-major and semi-minor axes,
- $E$ is the eccentric anomaly,
- $\varepsilon$ is the eccentricity,
- $\mu$ is the gravitational parameter,
- $i$ is the inclination,
- $\omega$ is the argument of periapsis,
- $\Omega$ is the longitude of the ascending node, and
- $r$ is the distance from the barycenter to the orbiter.
Does anybody recognize this algorithm? I'd like to understand what $\dot{\varepsilon}$ represents, and how those coefficients are combined to produce position and velocity.