-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sgp4 propagator accuracy #92
Comments
Hi @trufanov-nok !
Both :) There are two differences between your code in SatelliteToolbox and in skyfield. First, skyfield uses the constants from WGS72 by default whereas SatelliteToolbox uses from WGS84. Second, the function
whereas The code in SatelliteToolbox.jl to match skyfield's is: using SatelliteToolbox
tles = tle"""
1 41386U 16016A 23049.16798291 .00026516 00000-0 30339-3 0 9998
2 41386 97.1815 134.9260 0010580 260.1146 99.8918 15.62057491388243
1 41386U 16016A 23049.55234578 .00023500 00000-0 26893-3 0 9994
2 41386 97.1814 135.3158 0010590 258.1661 101.8410 15.62074590388300
"""
orbp = init_orbit_propagator(Val(:sgp4), tles[1]; sgp4_gc = sgp4_gc_wgs72)
# Get the position and velocity in TEME reference frame.
r_teme, v_teme = propagate_to_epoch!(orbp, tles[2].epoch)
# Convert to GCRF. Notice that we will need EOP data. If this is not wanted, we
# can use J2000.
eop = get_iers_eop()
# Obtain the DCM that converts TEME to GCRF.
D_gcrf_teme = r_eci_to_eci(TEME(), GCRF(), tles[2].epoch, eop)
# Convert the values.
r_gcrf = D_gcrf_teme * r_teme
v_gcrf = D_gcrf_teme * v_teme The result is:
The minor differences are probably some differences in the implementation. |
Indeed! Thanks a lot for explanation and the code sample! |
You're welcome! |
It seems only sgp4 propagator contains api to read orbit from TLE directly while docs mention other propagators should support it to... Was this api overload removed for them? |
Yes! It is a problem in the docs. A TLE is a set of mean elements for SGP4. I removed that interface so that we can avoid some errors. |
Hi,
I'm new to julia and tried to reproduce my python calculations with this package. Unfortunately the results don't match with python's skyfield package.
I have 2 TLE records (attached). test.tle.zip
Julia code:
result:
([-4.809400178348191e6, 4.756700552513811e6, 330.22513111666956], [675.0195082213636, 681.3381457850203, 7617.332409906825])
Python code:
Results are:
They don't match.
Am I missing something or sgp4 implementatons of SatelliteToolbox and skyfield produce dfferent results? If so, which implementation is correct?
The text was updated successfully, but these errors were encountered: