Skip temporary NORAD IDs when fetching TLEs
Celestrak started to return the TLE of 00005 when asked for NORAD IDs above 90000. Thus wrong TLEs were assigned to satellites with temporary NORAD IDs and manual_tle=False. This commit prevents satnogs to leak temporary NORAD IDs to Celestrak by skipping them during TLE updates. The threshold of 80000 is a motivated by the following - NORAD ID 80k-90k are used for "Analyst Objects", which aren't necessarily hardlinked to an object [1] - NORAD ID 90k+ don't seem to be assigned at the moment [2] [1]: https://www.space-track.org/documentation#faq [2]: https://celestrak.com/NORAD/elements/master.phpenvironments/production/deployments/255
parent
d483284f5c
commit
ec5885bdb8
|
@ -20,7 +20,11 @@ from network.celery import app
|
|||
@app.task(ignore_result=True)
|
||||
def update_all_tle():
|
||||
"""Task to update all satellite TLEs"""
|
||||
satellites = Satellite.objects.exclude(manual_tle=True, norad_follow_id__isnull=True)
|
||||
satellites = Satellite.objects.exclude(manual_tle=True,
|
||||
norad_follow_id__isnull=True)
|
||||
|
||||
# Skip satellites with temporary NORAD IDs
|
||||
satellites = satellites.exclude(norad_cat_id__gte=80000)
|
||||
|
||||
for obj in satellites:
|
||||
norad_id = obj.norad_cat_id
|
||||
|
|
Loading…
Reference in New Issue