I'm working on a program that calculates the orbital parameters of orbital bodies, and have run into an issue:
I'm looking up and comparing my programming results with the orbital parameters of Earth and the Sun, and realised that different equations seem to give me different results:
To elaborate, take the following parameters:
rmin
or Periapsis: 147.09 x10^9 metres
rmax
or Apoapsis: 152.10 x10^9 metres
ε
or Eccentricity: 0.0167
a
or Semi-major axis: 149.60 x10^9 metres
If I apply the following equation from here to obtain the Semi-minor axis, or b
:
$$b = a\sqrt{1 - \epsilon^{2}}$$
I receive the following value:
149600000000 * sqrt(1 - (0.0167^2)) = 149579137573 (On Google calculator)
However if I obtain the Semi-minor axis using the Semi-latus rectum, or p
from here:
$$ b = \frac{p}{\sqrt{1 - \epsilon^{2}}} $$
I obtain the following value:
149548054813 / sqrt(1 - (0.0167^2)) = 149568912904
When we look at the difference between these two numbers, there is a highly noticeable difference of 10224670 between them! I know this is based from Earths approximated orbital values, which we don't know the true values for, (I grabbed them from here)
My question is, which of these two equations are more accurate, WHY??, and are there any other equations that find the Semi-minor axis, also explaining the accuracy of them.
I saw the same thing for a few of the other properties (I think it was Semi-major) and I ended up with bizarre differences. I am calculating this right (according to the page) but seem to be getting huge error margins. Any ideas?
NOTE:
I obtained the Semi-latus rectum, or p
using the equation from here:
$$ p = \frac{r_{min} \cdot r_{max}}{a} $$
(152100000000 * 147090000000) / 149600000000 = 149548054813
Please bare in mind, I'm only in Year 11, so I may not understand everything you throw at me, also acknowledging that this is a pretty massive task for me to undertake to begin with; this also isn't any form of homework (thankgod), I'm doing this under my own taking.