Skip to content
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

Deserialization of ground stations from YAML should include integration time #140

Open
ChristopherRabotin opened this issue May 2, 2023 · 0 comments

Comments

@ChristopherRabotin
Copy link
Member

Bug report

Describe the bug

In an OD process, process_arc rebuilds the devices used in a measurement arc from the serialized YAML data, stored in the metadata of the parquet measurement file (via the rebuild_devices). However, the integration_time of a ground station is skipped during the serialization because it's serialized as the tuple of (centuries, nanoseconds), and that's just not user friendly.

Requires nyx-space/hifitime#217

To Reproduce

Steps to reproduce the behavior:

  1. Set up a measurement generation where at least one of the ground stations is configured for two way measurements
  2. Simulate measurements and export them to parquet
  3. Set up an OD Process with the arc loaded from the parquet file
  4. Set up the ODP and run with process_arc with debug logging turned on, e.g. RUST_LOG=nyx_space::od::msr=debug ....
  5. Notice that the computed measurements are shown as "one way" measurements instead of "two way" measurements as in the parquet file.

Expected behavior

I expect the computed measurements to be two way measurements as should be serialized in the parquet metadata.

Code to reproduce the issue

Cf. the od_robust_test_ekf_realistic_two_way test in tests/orbit_determination/robust.rs .

Additional context

Current work-around

You must redefine your ground stations and call process directly instead of process_arc.

Define the ground stations:

let mut dss65_madrid = GroundStation::dss65_madrid(
        elevation_mask,
        GaussMarkov::high_precision_range_km(),
        GaussMarkov::high_precision_doppler_km_s(),
        iau_earth,
    );
    // Set the integration time so as to generate two way measurements
    dss65_madrid.integration_time = Some(60.seconds());
    let mut dss34_canberra = GroundStation::dss34_canberra(
        elevation_mask,
        GaussMarkov::high_precision_range_km(),
        GaussMarkov::high_precision_doppler_km_s(),
        iau_earth,
    );
    dss34_canberra.integration_time = Some(60.seconds());

    // Define the tracking configurations
    let mut configs = HashMap::new();
    configs.insert(
        dss65_madrid.name.clone(),
        TrkConfig {
            // Make sure to start the tracking one integration time after the start of the trajectory
            start: simulator::Availability::Epoch(dt + 60.seconds()),
            sampling: 60.seconds(),
            ..Default::default()
        },
    );
    configs.insert(
        dss34_canberra.name.clone(),
        TrkConfig {
            // Make sure to start the tracking one integration time after the start of the trajectory
            start: simulator::Availability::Epoch(dt + 60.seconds()),
            sampling: 60.seconds(),
            ..Default::default()
        },
    );

    // Note that we do not have Goldstone so we can test enabling and disabling the EKF.
    let devices = vec![dss65_madrid, dss34_canberra];

Convert into a hashmap

// Build the hashmap of devices from the vector using their names
    let mut devices_map = devices
        .into_iter()
        .map(|dev| (dev.name.clone(), dev))
        .collect::<HashMap<_, _>>();

Manually call process

odp.process(
        &subset.measurements,
        &mut devices_map.clone(),
        subset.min_duration_sep().unwrap(),
    )
    .unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant