Eccentricity vector (source code)

= Eccentricity vector
{title2=$\mathbf e$}
{wiki}

For an attractive <Kepler orbit> with gravitational parameter $GM$, <velocity> $\mathbf v$ and <specific angular momentum> $\mathbf h=\mathbf r\times\mathbf v$, the eccentricity vector is
$$
\mathbf e=\frac{\mathbf v\times\mathbf h}{GM}-\widehat{\mathbf r}.
$$
Its magnitude is the <orbital eccentricity>, and it points toward <periapsis> for a noncircular orbit. It is a normalized attractive <Laplace-Runge-Lenz vector>; it remains constant under the pure inverse-square force.