nyx-space / nyx

Nyx is a high fidelity, fast, reliable and validated astrodynamics toolkit library written in Rust and available in Python
https://nyxspace.com
GNU Affero General Public License v3.0
198 stars 20 forks source link

Revamp tracking schedule building #261

Closed ChristopherRabotin closed 11 months ago

ChristopherRabotin commented 11 months ago

Effects

Includes breaking changes for the TrkConfig.

There was an attempt at building a tracking schedule while the measurements were generated. This led to a few unrealistic set ups, including the fact that the sampling rate could be wrong because of some attempt at being clever would fail.

This PR changes how TrkConfig is set up. There no longer is a start and end time per se. Instead, there's a scheduler, which will always schedule on visibility (defined as elevation > 0, regardless of the elevation mask of the ground station), and a cadence (either Continuous or Intermittent with an on/off tracking). From the scheduler, a set of "tracking strands" are built: these correspond to start/stop times during which the vehicle is over the horizon (in the SEZ frame of the ground station). Then, there is a "hand off" strategy that determines how to handle the case where several ground stations can see the vehicle.

Fixes #260

Measurement plots

The following plots used this configuration:

Madrid:
  strands:
    - start: 2020-01-01 00:00:00 UTC
      end: 2020-01-01 03:00:00 UTC
  sampling: 1 min

Canberra:
  strands:
    - start: 2020-01-01 15:00:00 UTC
      end: 2020-01-01 17:00:00 UTC
    - start: 2020-01-01 19:00:00 UTC
      end: 2020-01-02 00:00:00 UTC
  sampling: 1 min

Goldstone:
  strands:
    - start: 2020-01-01 06:00:00 UTC
      end: 2020-01-01 08:00:00 UTC
    - start: 2020-01-01 09:00:00 UTC
      end: 2020-01-01 12:00:00 UTC
  sampling: 1 min

No type specified

Shows all tracking strands:

newplot

In [1]: from nyx_space.plots.od import plot_measurements
In [2]: import pandas as pd
In [3]: msr_df = pd.read_parquet("/home/chris/Workspace/nyx-space/nyx/output_data/two_body_od_val_arc.parquet")
In [4]: plot_measurements(msr_df)

Ranging data

Fuzzy matching on column name: plot_measurements(msr_df, "range") newplot(1)

Doppler data

Fuzzy matching on column name: plot_measurements(msr_df, "dop") newplot(2)

TODO

P.S.: This PR likely includes quite a bit more work.

github-actions[bot] commented 11 months ago

Visit the preview URL for this PR (updated for commit c5bd169):

https://nyx-rustdoc--pr261-hotfix-tracking-sche-2qbe6whg.web.app

(expires Sat, 30 Dec 2023 08:31:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d8e2a55934352d850c15d11866c39eb2d2e029be