This question here calculated the time a satellite was in the shadow of the earth for a circular orbit. I was wondering if there was a way to do the same thing for an elliptical orbit.
1 Answer
Only numerically
Yes, it is possible, but only with the use of numerical methods. Instead of using
$$ t = \tau \frac{\theta}{2\pi} $$
(As the answer you referenced does) You must use a more general expression derived from Kepler’s second law:
$$ dt = \tau \frac{r^2}{2\pi ab} d\theta $$
Where $\tau$ is the orbital period, $a$ and $b$ are the semi-major and semi-minor axis of the orbit, and $r$ is a function of $\theta$ the true anomaly. To solve for $t(\theta)$ requires numerical methods; there is no closed form solution except in the case of circular orbits.