For a small simulation I'm working I'm in need to provide an instantaneous speed (and acceleration).
The system is a basic "2 dimensional" orbit system. The orbits follow kepler's law of orbits. Which can be described in a polar system $(\mathbf{r}, \boldsymbol{\nu})$ as:
$$\mathbf{r(\nu)} = \frac{a (1 - e^2)}{1 + e \cos(\nu)} \hat{r}$$ $r$ is the radius, $a$ the semimajor axis $e$ the eccentricity $\nu$ the true anomaly
Using kepler's second law this can be "solved" to simple linear function by introducing a special angle called the "mean anomaly" ($M$) - $E$ is the eccentric anomaly: $$M = E + \sin(E)$$
$$M(t) = M_0 + nt $$ $$n = \sqrt{\frac{GM}{a^3}}$$ With $G$ = gravitational constant, $M$ = "solar" mass.
Now the Eccentric motion needs to be calculated numerically, but newton's method is converting fast enough for my purposes. And more importantly: using this structure there is no growing truncation error.
Anyways, I wonder how to come from this to the speed a certain point? A speed vector to be exact ($\dot{r}(t), \dot{\nu}(t)$). And the accelerataion vector.
I'm kind of stuck in the method of progression, I'd really prefer something better than just inserting two times, and calculate the $\Delta E$ between those two numerically.
I could use the vis-viva equation:
$$v^2 = GM \left(\frac 2 r - \frac 1 a \right)$$
But that only gives the magnitude and seems ugly to then use geometry to calculate the vector?