nyx
nyx copied to clipboard
Deserialization of ground stations from YAML should include integration time
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 https://github.com/nyx-space/hifitime/issues/217
To Reproduce
Steps to reproduce the behavior:
- Set up a measurement generation where at least one of the ground stations is configured for two way measurements
- Simulate measurements and export them to parquet
- Set up an OD Process with the arc loaded from the parquet file
- Set up the ODP and run with
process_arc
with debug logging turned on, e.g.RUST_LOG=nyx_space::od::msr=debug ...
. - 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();