I am trying to calculate the Classical Orbital Elements of the ISS using Python, and then compare them with the "actual" ones provided on the Internet. However, my obtained data differs by a lot from the "actual" one.
I am using the ISS TLE from this website, which at the time I am writing this (2020-12-04 04:19) it says:
1 25544U 98067A 20339.83283773 .00016717 00000-0 10270-3 0 9038
2 25544 51.6418 224.1133 0001925 115.0430 245.0920 15.49154811 18464
Epoch (UTC): 04 December 2020 19:59:17
Now, using a modified version of the code from the answer from this question: How do I obtain geocentric position vectors at three successive times before I use Gibbs' method?,
from skyfield.api import EarthSatellite, Topos, load
import numpy as np
ts = load.timescale()
minutes = np.linspace(0, 60, 3)
t = ts.utc(2020, 12, 4, 20, minutes, 0)
l1 = '1 25544U 98067A 20339.83283773 .00016717 00000-0 10270-3 0 9038'
l2 = '2 25544 51.6418 224.1133 0001925 115.0430 245.0920 15.49154811 18464'
satellite = EarthSatellite(l1, l2, name='ISS (ZARYA)')
geocentric = satellite.at(t)
r1, r2, r3 = geocentric.position.km
print(f"x/y/z of r1: {r1}")
print(f"x/y/z of r2: {r2}")
print(f"x/y/z of r2: {r3}")
I was able to obtain these positional vectors:
x/y/z of r1: [-4755.01172716 4947.37677595 377.21687117] # at '2020-12-04 20:00:00 UTC'
x/y/z of r2: [-4851.24226498 -367.40786871 5177.39228056] # at '2020-12-04 20:30:00 UTC'
x/y/z of r2: [ 268.17962108 4636.21164042 -4395.73178942] # at '2020-12-04 21:00:00 UTC'
After getting these, I used Gibbs' method to obtain the following v2
v2 = [3.0406; -6.1187; 2.3591]
At this point, I use poliastro's rv2coe function to find the COEs:
from poliastro.constants import GM_earth
from poliastro.core.elements import rv2coe
from astropy import units as u
import numpy as np
k = GM_earth.to(u.km ** 3 / u.s ** 2).value
r2 from the obtained positional vectors
r = np.array([-4851., -367., 5177.])
v2 calculated from Gibbs' method
v = np.array([3.040, -6.118, 2.359])
p, ecc, inc, raan, argp, nu = rv2coe(k, r, v)
print("p:", p, "[km]")
print("ecc:", ecc)
print("inc:", np.rad2deg(inc), "[deg]")
print("raan:", np.rad2deg(raan), "[deg]")
print("argp:", np.rad2deg(argp), "[deg]")
print("nu:", np.rad2deg(nu), "[deg]")
Which resulted in:
p: 6613.627129899017 [km]
ecc: 0.06923948841179417
inc: 53.14716567039852 [deg]
raan: 131.4224364765848 [deg]
argp: 241.26105012632252 [deg]
nu: 184.34321702974734 [deg]
Now, these result differ a lot from the results shown on the website. At the time I am writing this, the results from the website mentioned above are:
Epoch (UTC): 04 December 2020 19:59:17
Eccentricity: 0.0001925
inclination: 51.6418°
perigee height: 418 km
apogee height: 420 km
right ascension of ascending node: 224.1133°
argument of perigee: 115.0430°
revolutions per day: 15.49154811
mean anomaly at epoch: 245.0920°
orbit number at epoch: 1846
My question being: why do my results differ so much? Did I miss something?

rv2coe. (3) You did not show how you calculated velocity. Maybe you made a mistake there. (4) Gibb's method doesn't quite apply here. A sanity check shows that you should expect two places of accuracy. (5) You are calculating Keplerian osculating elements 30+ minutes after the epoch. (6) This is the biggest: Two line elements are not Keplerian osculating elements. – David Hammen Dec 04 '20 at 11:41rv2coeassumes) do not account for these effects. Two line elements are not osculating Keplerian elements. – David Hammen Dec 04 '20 at 11:58@uhoh, [re: your first comment], can't figure it out -- was it because my time of 30 mins was too large? or? hmm. :)
– lawndownunder Dec 05 '20 at 02:07