Skip to content

Commit 852c63f

Browse files
Merge pull request #120 from nyx-space/33-high-fidelity-rotation-information-binary-pck-conversion
Add rotation computation using planetary data and PCK/BPC files
2 parents 47c92d0 + 034539f commit 852c63f

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

+8356
-798
lines changed

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
# Summary
3+
4+
**Summarize the proposed changes**
5+
6+
## Architectural Changes
7+
8+
<!-- List any architectural changes made in this pull request, including any changes to the directory structure, file organization, or dependencies. -->
9+
10+
No change
11+
12+
## New Features
13+
14+
<!-- List any new features added in this pull request, including any new tools or functionality. -->
15+
16+
No change
17+
18+
## Improvements
19+
20+
<!-- List any improvements made in this pull request, including any performance optimizations, bug fixes, or other enhancements. -->
21+
22+
No change
23+
24+
## Bug Fixes
25+
26+
<!-- List any bug fixes made in this pull request, including any issues that were resolved. -->
27+
28+
No change
29+
30+
## Testing and validation
31+
32+
<!-- Please provide information on how the changes in this pull request were tested, including any new tests that were added or existing tests that were modified. -->
33+
34+
**Detail the changes in tests, including new tests and validations**
35+
36+
## Documentation
37+
38+
<!-- Detail documentation changes if this pull request primarily deals with documentation. -->
39+
40+
This PR does not primarily deal with documentation changes.
41+
42+
<!-- Thank you for contributing to ANISE! -->

.github/workflows/benchmarks.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
type2_chebyshev:
14-
name: JPL DE Benchmark
13+
ephem_type2_chebyshev:
14+
name: SPICE versus ANISE Benchmark
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout sources
@@ -28,38 +28,17 @@ jobs:
2828
- name: Install CSPICE
2929
run: sh dev-env-setup.sh && cd .. # Return to root
3030

31-
- name: Bench
31+
- name: Bench JPL Ephemerides
3232
run: cargo bench --bench "*_jpl_ephemerides"
33-
34-
- name: Save benchmark artifacts
35-
uses: actions/upload-artifact@v3
36-
with:
37-
name: jpl-development-ephemerides-benchmark
38-
path: target/criterion/**/report/*
39-
40-
type13_hermite:
41-
name: Hermite Benchmark
42-
runs-on: ubuntu-latest
43-
steps:
44-
- name: Checkout sources
45-
uses: actions/checkout@v3
46-
with:
47-
lfs: true
48-
49-
- name: Install stable toolchain
50-
uses: actions-rs/toolchain@v1
51-
with:
52-
toolchain: stable
53-
override: true
54-
55-
- name: Install CSPICE
56-
run: sh dev-env-setup.sh && cd .. # Return to root
57-
58-
- name: Bench
33+
34+
- name: Bench Spacecraft (Hermite type 13)
5935
run: cargo bench --bench "*_spacecraft_ephemeris"
36+
37+
- name: Bench Binary planetary constants
38+
run: cargo bench --bench "crit_bpc_rotation"
6039

6140
- name: Save benchmark artifacts
6241
uses: actions/upload-artifact@v3
6342
with:
64-
name: spacecraft-ephemeris-benchmark
43+
name: jpl-development-ephemerides-benchmark
6544
path: target/criterion/**/report/*

.github/workflows/tests.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,18 @@ jobs:
117117
cargo run -- inspect data/de440.bsp
118118
119119
- name: Rust-SPICE JPL DE validation
120-
run: |
121-
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde_de440s --features spkezr_validation --release -- --nocapture --ignored
122-
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde_de440_full --features spkezr_validation --release -- --nocapture --ignored
120+
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde --features spkezr_validation --release -- --nocapture --include-ignored --test-threads 1
123121

124122
- name: Rust-SPICE hermite validation
125-
run: |
126-
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_from_gmat --features spkezr_validation --release -- --nocapture --ignored
127-
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_with_varying_segment_sizes --features spkezr_validation --release -- --nocapture --ignored
123+
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_ --features spkezr_validation --release -- --nocapture --include-ignored --test-threads 1
124+
125+
- name: Rust-SPICE PCK validation
126+
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_iau_rotation_to_parent --release -- --nocapture --ignored
127+
128+
- name: Rust-SPICE BPC validation
129+
run: |
130+
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_bpc_ --release -- --nocapture --include-ignored --test-threads 1
131+
RUST_BACKTRACE=1 RUST_LOG=debug cargo test de440s_translation_verif_venus2emb --release -- --nocapture --include-ignored --test-threads 1
128132
129133
# Now analyze the results and create pretty plots
130134
- uses: actions/setup-python@v4
@@ -172,6 +176,10 @@ jobs:
172176
cargo llvm-cov clean --workspace
173177
cargo llvm-cov test --no-report -- --test-threads=1
174178
cargo llvm-cov test --no-report --tests -- compile_fail
179+
cargo llvm-cov test --no-report validate_iau_rotation_to_parent -- --nocapture --ignored
180+
cargo llvm-cov test --no-report validate_bpc_to_iau_rotations -- --nocapture --ignored
181+
cargo llvm-cov test --no-report validate_jplde_de440s --features spkezr_validation -- --nocapture --ignored
182+
cargo llvm-cov test --no-report validate_hermite_type13_from_gmat --features spkezr_validation -- --nocapture --ignored
175183
cargo llvm-cov report --lcov > lcov.txt
176184
env:
177185
RUSTFLAGS: --cfg __ui_tests

.vscode/tasks.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "cargo",
6+
"command": "test",
7+
"args": [
8+
"validate_bpc_",
9+
"--",
10+
"--nocapture",
11+
"--include-ignored",
12+
"--test-threads",
13+
"1",
14+
],
15+
"problemMatcher": [
16+
"$rustc"
17+
],
18+
"group": "none",
19+
"label": "ANISE: BPC validation"
20+
},
21+
{
22+
"type": "cargo",
23+
"command": "test",
24+
"args": [
25+
"validate_hermite_type13_",
26+
"--features",
27+
"spkezr_validation",
28+
"--release",
29+
"--",
30+
"--nocapture",
31+
"--include-ignored",
32+
"--test-threads",
33+
"1",
34+
],
35+
"problemMatcher": [
36+
"$rustc"
37+
],
38+
"group": "none",
39+
"label": "ANISE: SPK Hermite validation"
40+
},
41+
{
42+
"type": "cargo",
43+
"command": "test",
44+
"args": [
45+
"validate_jplde",
46+
"--features",
47+
"spkezr_validation",
48+
"--release",
49+
"--",
50+
"--nocapture",
51+
"--include-ignored",
52+
"--test-threads",
53+
"1",
54+
],
55+
"problemMatcher": [
56+
"$rustc"
57+
],
58+
"group": "none",
59+
"label": "ANISE: SPK Chebyshev validation"
60+
}
61+
]
62+
}

Cargo.toml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,45 @@ keywords = ["attitude", "navigation", "instrument", "spacecraft", "ephemeris"]
1111
categories = ["science", "simulation"]
1212
readme = "README.md"
1313
license = "MPL-2.0"
14-
exclude = ["cspice"]
14+
exclude = [
15+
"cspice*",
16+
"data",
17+
"analysis",
18+
".vscode",
19+
".github",
20+
".venv",
21+
".vscode",
22+
"*.sh",
23+
]
1524

1625
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1726

1827
[dependencies]
1928
hifitime = "3.8"
20-
memmap2 = "0.9.0"
21-
crc32fast = "1.3.0"
29+
memmap2 = "=0.9.0"
30+
crc32fast = "=1.3.2"
2231
der = { version = "0.7.8", features = ["derive", "alloc", "real"] }
23-
clap = { version = "3.1", features = ["derive"] }
24-
thiserror = "1.0"
25-
log = "0.4"
26-
pretty_env_logger = "0.5"
27-
tabled = "0.14"
32+
clap = { version = "4", features = ["derive"] }
33+
log = "=0.4"
34+
pretty_env_logger = "=0.5"
35+
tabled = "=0.14"
2836
const_format = "0.2"
2937
nalgebra = "0.32"
30-
approx = "0.5.1"
31-
zerocopy = { version = "0.7.3", features = ["derive"] }
32-
bytes = "1.4.0"
33-
snafu = { version = "0.7.4", features = ["backtrace"] }
38+
approx = "=0.5.1"
39+
zerocopy = { version = "0.7.26", features = ["derive"] }
40+
bytes = "=1.4.0"
41+
snafu = { version = "0.7.5", features = ["backtrace"] }
3442
lexical-core = "0.8.5"
3543
heapless = "0.8.0"
3644
rstest = "0.18.2"
3745

3846
[dev-dependencies]
39-
rust-spice = "0.7.4"
40-
parquet = "47.0.0"
41-
arrow = "47.0.0"
47+
rust-spice = "0.7.6"
48+
parquet = "49.0.0"
49+
arrow = "49.0.0"
4250
criterion = "0.5"
4351
iai = "0.1"
44-
polars = { version = "0.34", features = ["lazy", "parquet"] }
52+
polars = { version = "0.34.2", features = ["lazy", "parquet"] }
4553
rayon = "1.7"
4654

4755
[features]
@@ -61,5 +69,9 @@ name = "crit_jpl_ephemerides"
6169
harness = false
6270

6371
[[bench]]
64-
name = "iai_spacecraft_ephemeris"
72+
name = "crit_spacecraft_ephemeris"
73+
harness = false
74+
75+
[[bench]]
76+
name = "crit_bpc_rotation"
6577
harness = false

0 commit comments

Comments
 (0)