The relative distance of a planet moving around the sun is found to be:
$$r(\varphi) = \dfrac{\kappa}{1+\varepsilon\,\cos(\varphi)} \quad \text{where} \quad \kappa = \dfrac{L^2}{G\,{m_p}^2\,m_s} \quad \varepsilon = \sqrt{\dfrac{2\,E\,L^2}{G\,{m_p}^3\,m_s}}$$
Where $m_p$ is the mass of the planet, $m_s \gg m_p$ the mass of the sun and $G$ the gravitational constant.
In this case I just like to focus on the eccentricity $\varepsilon$. How do I determine this thing?
What troubles me is the definition of the total Energy: $E = \dfrac{1}{2}m_p\,\dot{r}^2 + \dfrac{L^2}{2\,m\,r^2}-\dfrac{G^,m_s\,m_p}{r}$
As well as the definition of the angular momentum: $L = r\times m_s\,\dot{r}$. The only question is:
$\textbf{What values do I choose for $r$ and $\dot{r}$} ?$ Distance from the earth to the sun and velocity on its orbit? But these are changing with time!
Alternatively there is this geometric formula: $\varepsilon = \dfrac{r_{max}-r_{min}}{r_{max}+r_{min}}$ that I don't like to use.