Skip to content

Commit 16c4448

Browse files
Merge pull request #379 from nyx-space/feat/gh-333-od-msr-jit-filtering
Breaking changes: runtime filtering of measurements and selection of processing for simultaneous measurements
2 parents 0f7d266 + 1ec99a9 commit 16c4448

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3677
-2886
lines changed

.github/workflows/coverage.yaml

-51
This file was deleted.

.github/workflows/rust.yaml

+40-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ jobs:
7373
restore-keys: ${{ runner.os }}-cargo-
7474

7575
- name: Unit Test (debug)
76-
run: cargo test --lib
76+
run: |
77+
cat /home/runner/work/nyx/nyx/data/tests/config/many_ground_stations.yaml
78+
cat /home/runner/work/nyx/nyx/data/tests/config/one_ground_station.yaml
79+
ls -lh /home/runner/work/nyx/nyx/data/tests/config/
80+
cargo test --lib
7781
7882
- name: All integration tests (release)
7983
run: cargo test --release --test "*"
@@ -89,6 +93,41 @@ jobs:
8993
cargo build --example 03_geo_raise --release
9094
cargo build --example 03_geo_sk --release
9195
96+
coverage:
97+
name: Unit test and integration test coverage analysis
98+
runs-on: ubuntu-latest
99+
100+
steps:
101+
- name: Checkout
102+
uses: actions/checkout@v3
103+
104+
- name: Install stable toolchain
105+
uses: dtolnay/rust-toolchain@master
106+
with:
107+
toolchain: stable
108+
components: rustfmt, clippy
109+
110+
- name: Download data
111+
run: |
112+
wget -O data/de440s.bsp http://public-data.nyxspace.com/anise/de440s.bsp
113+
wget -O data/de440s.bsp http://public-data.nyxspace.com/anise/de438.bsp # GMAT validation cases
114+
wget -O data/pck08.pca http://public-data.nyxspace.com/anise/v0.4/pck08.pca
115+
wget -O data/earth_latest_high_prec.bpc http://public-data.nyxspace.com/anise/ci/earth_latest_high_prec-2023-09-08.bpc
116+
117+
- name: Install cargo-llvm-cov
118+
uses: taiki-e/install-action@cargo-llvm-cov
119+
- name: Generate full code coverage
120+
run: |
121+
cargo llvm-cov test --release --lib --no-report
122+
cargo llvm-cov test --release cov_test --no-report
123+
cargo llvm-cov report --release --lcov --output-path lcov.info
124+
- name: Upload coverage to Codecov
125+
uses: codecov/codecov-action@v3
126+
with:
127+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
128+
files: lcov.info
129+
fail_ci_if_error: false
130+
92131
lints:
93132
name: Lints
94133
runs-on: ubuntu-latest

Cargo.toml

+3-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ gitlab = { repository = "nyx-space/nyx", branch = "master" }
3838
nalgebra = "0.33"
3939
log = "0.4"
4040
hifitime = "4.0.0"
41-
# anise = "0.5.0" # UNRELEASED
42-
anise = { git = "https://github.com/nyx-space/anise.git", branch = "master" }
41+
anise = "0.5.0"
4342
flate2 = { version = "1.0", features = [
4443
"rust_backend",
4544
], default-features = false }
@@ -50,7 +49,6 @@ hyperdual = "1.3.0"
5049
bytes = "1.0"
5150
rand = "0.8"
5251
rand_distr = "0.4"
53-
rust-embed = "8"
5452
regex = "1.5"
5553
rayon = "1.6"
5654
lazy_static = "1.4.0"
@@ -64,7 +62,7 @@ parquet = { version = "53.0.0", default-features = false, features = [
6462
] }
6563
arrow = "53.0.0"
6664
shadow-rs = { version = "0.36.0", default-features = false }
67-
serde_yaml = "0.9.21"
65+
serde_yml = "0.0.12"
6866
whoami = "1.3.0"
6967
either = { version = "1.8.1", features = ["serde"] }
7068
num = "0.4.0"
@@ -73,6 +71,7 @@ getrandom = { version = "0.2", features = ["js"] }
7371
typed-builder = "0.20.0"
7472
snafu = { version = "0.8.3", features = ["backtrace"] }
7573
serde_dhall = "0.12"
74+
indexmap = {version = "2.6.0", features = ["serde"]}
7675

7776

7877
[dev-dependencies]

data/tests/config/many_ground_stations.yaml

+24-16
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
mu_km3_s2: 398600.435436096
66
shape: null
77
elevation_mask_deg: 5.0
8-
range_noise_km:
9-
bias:
10-
tau: 24 h
11-
process_noise: 5.0e-3 # 5 m
12-
doppler_noise_km_s:
13-
bias:
14-
tau: 24 h
15-
process_noise: 50.0e-6 # 5 cm/s
8+
stochastic_noises:
9+
range_km:
10+
bias:
11+
tau: 24 h
12+
process_noise: 5.0e-3 # 5 m
13+
doppler_km_s:
14+
bias:
15+
tau: 24 h
16+
process_noise: 50.0e-6 # 5 cm/s
1617
light_time_correction: false
1718
latitude_deg: 2.3522
1819
longitude_deg: 48.8566
1920
height_km: 0.4
21+
measurement_types:
22+
- range_km
23+
- doppler_km_s
2024

2125
- name: Canberra
2226
frame:
@@ -28,12 +32,16 @@
2832
longitude_deg: 148.981944
2933
height_km: 0.691750
3034
elevation_mask_deg: 5.0
31-
range_noise_km:
32-
bias:
33-
tau: 24 h
34-
process_noise: 5.0e-3 # 5 m
35-
doppler_noise_km_s:
36-
bias:
37-
tau: 24 h
38-
process_noise: 50.0e-6 # 5 cm/s
35+
stochastic_noises:
36+
range_km:
37+
bias:
38+
tau: 24 h
39+
process_noise: 5.0e-3 # 5 m
40+
doppler_km_s:
41+
bias:
42+
tau: 24 h
43+
process_noise: 50.0e-6 # 5 cm/s
3944
light_time_correction: false
45+
measurement_types:
46+
- range_km
47+
- doppler_km_s

data/tests/config/one_ground_station.yaml

+13-8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ elevation_mask_deg: 5.0
88
latitude_deg: 2.3522
99
longitude_deg: 48.8566
1010
height_km: 0.4
11-
range_noise_km:
12-
bias:
13-
tau: 24 h
14-
process_noise: 5.0e-3 # 5 m
15-
doppler_noise_km_s:
16-
bias:
17-
tau: 24 h
18-
process_noise: 50.0e-6 # 5 cm/s
11+
stochastic_noises:
12+
range_km:
13+
bias:
14+
tau: 24 h
15+
process_noise: 5.0e-3 # 5 m
16+
doppler_km_s:
17+
bias:
18+
tau: 24 h
19+
process_noise: 50.0e-6 # 5 cm/s
1920
light_time_correction: false
21+
measurement_types:
22+
- range_km
23+
- doppler_km_s
24+
integration_time: 1 min

examples/02_jwst_covar_monte_carlo/main.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ use nyx::{
1616
dynamics::{guidance::LocalFrame, OrbitalDynamics, SolarPressure, SpacecraftDynamics},
1717
io::ExportCfg,
1818
mc::MonteCarlo,
19-
od::{prelude::KF, process::SpacecraftUncertainty, SpacecraftODProcess},
19+
od::{msr::TrackingDataArc, prelude::KF, process::SpacecraftUncertainty, SpacecraftODProcess},
2020
propagators::Propagator,
2121
Spacecraft, State,
2222
};
2323

24-
use std::{error::Error, sync::Arc};
24+
use std::{collections::BTreeMap, error::Error, sync::Arc};
2525

2626
fn main() -> Result<(), Box<dyn Error>> {
2727
pel::init();
@@ -116,13 +116,17 @@ fn main() -> Result<(), Box<dyn Error>> {
116116

117117
// Build the propagation instance for the OD process.
118118
let prop = setup.with(jwst.with_stm(), almanac.clone());
119-
let mut odp = SpacecraftODProcess::ckf(prop, ckf, None, almanac.clone());
119+
let mut odp = SpacecraftODProcess::ckf(prop, ckf, BTreeMap::new(), None, almanac.clone());
120120

121121
// Define the prediction step, i.e. how often we want to know the covariance.
122122
let step = 1_i64.minutes();
123123
// Finally, predict, and export the trajectory with covariance to a parquet file.
124124
odp.predict_for(step, prediction_duration)?;
125-
odp.to_parquet("./02_jwst_covar_map.parquet", ExportCfg::default())?;
125+
odp.to_parquet(
126+
&TrackingDataArc::default(),
127+
"./02_jwst_covar_map.parquet",
128+
ExportCfg::default(),
129+
)?;
126130

127131
// === Monte Carlo framework ===
128132
// Nyx comes with a complete multi-threaded Monte Carlo frame. It's blazing fast.

examples/03_geo_analysis/stationkeeping.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use nyx::{
1818
Harmonics, OrbitalDynamics, SolarPressure, SpacecraftDynamics,
1919
},
2020
io::{gravity::HarmonicsMem, ExportCfg},
21-
mc::{MonteCarlo, MultivariateNormal, StateDispersion},
21+
mc::{MonteCarlo, MvnSpacecraft, StateDispersion},
2222
md::{prelude::Objective, StateParameter},
2323
propagators::{ErrorControl, IntegratorOptions, Propagator},
2424
Spacecraft, State,
@@ -88,7 +88,7 @@ fn main() -> Result<(), Box<dyn Error>> {
8888
// Let's start by defining the dispersion.
8989
// The MultivariateNormal structure allows us to define the dispersions in any of the orbital parameters, but these are applied directly in the Cartesian state space.
9090
// Note that additional validation on the MVN is in progress -- https://github.com/nyx-space/nyx/issues/339.
91-
let mc_rv = MultivariateNormal::new(
91+
let mc_rv = MvnSpacecraft::new(
9292
sc,
9393
vec![StateDispersion::zero_mean(StateParameter::SMA, 3.0)],
9494
)?;

examples/04_lro_od/dsn-network.yaml

+45-30
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
- name: DSS-65 Madrid
1+
DSS-65 Madrid:
2+
name: DSS-65 Madrid
23
frame:
34
ephemeris_id: 399
45
orientation_id: 399
56
mu_km3_s2: 398600.435436096
67
shape: null
78
elevation_mask_deg: 5.0
8-
range_noise_km:
9-
white_noise:
10-
mean: 0.0
11-
sigma: 5.0e-3 # 5 m
12-
doppler_noise_km_s:
13-
white_noise:
14-
mean: 0.0
15-
sigma: 50.0e-6 # 5 cm/s
16-
light_time_correction: false
9+
stochastic_noises:
10+
range_km:
11+
white_noise:
12+
mean: 0.0
13+
sigma: 5.0e-3 # 5 m
14+
doppler_km_s:
15+
white_noise:
16+
mean: 0.0
17+
sigma: 50.0e-6 # 5 cm/s
18+
light_time_correction: true
1719
latitude_deg: 40.427222
1820
longitude_deg: 4.250556
1921
height_km: 0.834939
22+
measurement_types:
23+
- range_km
24+
- doppler_km_s
2025

21-
- name: DSS-34 Canberra
26+
DSS-34 Canberra:
27+
name: DSS-34 Canberra
2228
frame:
2329
ephemeris_id: 399
2430
orientation_id: 399
@@ -28,17 +34,22 @@
2834
longitude_deg: 148.981944
2935
height_km: 0.691750
3036
elevation_mask_deg: 5.0
31-
range_noise_km:
32-
white_noise:
33-
mean: 0.0
34-
sigma: 5.0e-3 # 5 m
35-
doppler_noise_km_s:
36-
white_noise:
37-
mean: 0.0
38-
sigma: 50.0e-6 # 5 cm/s
39-
light_time_correction: false
37+
stochastic_noises:
38+
range_km:
39+
white_noise:
40+
mean: 0.0
41+
sigma: 5.0e-3 # 5 m
42+
doppler_km_s:
43+
white_noise:
44+
mean: 0.0
45+
sigma: 50.0e-6 # 5 cm/s
46+
light_time_correction: true
47+
measurement_types:
48+
- range_km
49+
- doppler_km_s
4050

41-
- name: DSS-13 Goldstone
51+
DSS-13 Goldstone:
52+
name: DSS-13 Goldstone
4253
frame:
4354
ephemeris_id: 399
4455
orientation_id: 399
@@ -48,12 +59,16 @@
4859
longitude_deg: 243.205
4960
height_km: 1.071149
5061
elevation_mask_deg: 5.0
51-
range_noise_km:
52-
white_noise:
53-
mean: 0.0
54-
sigma: 5.0e-3 # 5 m
55-
doppler_noise_km_s:
56-
white_noise:
57-
mean: 0.0
58-
sigma: 50.0e-6 # 5 cm/s
59-
light_time_correction: false
62+
stochastic_noises:
63+
range_km:
64+
white_noise:
65+
mean: 0.0
66+
sigma: 5.0e-3 # 5 m
67+
doppler_km_s:
68+
white_noise:
69+
mean: 0.0
70+
sigma: 50.0e-6 # 5 cm/s
71+
light_time_correction: true
72+
measurement_types:
73+
- range_km
74+
- doppler_km_s

0 commit comments

Comments
 (0)