Skip to content

Add sat_id filters on the differents api views

deck requested to merge (removed):add-sat-id-filter-to-api into master

This work is a proposal to fixe #473 (closed)

I added the satellite id field in all api's endpoints where a norad id filter was present :

  • satellites [if a sat_id of a merged satellite is entered, it will return the parent]
  • transmitters
  • telemetry
  • tle

Regarding transmitter, telemetry and TLE, you can either search for a single sat_id (&sat_id=CFLI-0543-9871-5411-6955) or for a serie of sat_id (&sat_id=CFLI-0543-9871-5411-6955,BTEP-5467-6423-3488-4155)

Notes :

  • Regarding the implementation of get_current_sat_from_sat_id, i search a long time to do the query in one query, but didn't find a way to do it. If someone have more experience in Django QuerySet want to have a look, be my guest :) I would be really interested if there is a better way.

  • I removed satellite__associated_satellite__isnull=True on the queryset in the Transmitter view. Because like @adamkalis said, after the merge of a satellite, the date related to that satellite are not re-mapped to the "new" one (parent). So if we keep this filter, those transmitters will never be accessible again.

Some pictures :

satidsat

satidtle

satidtransmitter

Edited by deck

Merge request reports