Skip to content

Commit

Permalink
Merge pull request #120 from nyx-space/33-high-fidelity-rotation-info…
Browse files Browse the repository at this point in the history
…rmation-binary-pck-conversion

Add rotation computation using planetary data and PCK/BPC files
  • Loading branch information
ChristopherRabotin committed Nov 16, 2023
2 parents 47c92d0 + 034539f commit 852c63f
Show file tree
Hide file tree
Showing 81 changed files with 8,356 additions and 798 deletions.
42 changes: 42 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# Summary

**Summarize the proposed changes**

## Architectural Changes

<!-- List any architectural changes made in this pull request, including any changes to the directory structure, file organization, or dependencies. -->

No change

## New Features

<!-- List any new features added in this pull request, including any new tools or functionality. -->

No change

## Improvements

<!-- List any improvements made in this pull request, including any performance optimizations, bug fixes, or other enhancements. -->

No change

## Bug Fixes

<!-- List any bug fixes made in this pull request, including any issues that were resolved. -->

No change

## Testing and validation

<!-- 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. -->

**Detail the changes in tests, including new tests and validations**

## Documentation

<!-- Detail documentation changes if this pull request primarily deals with documentation. -->

This PR does not primarily deal with documentation changes.

<!-- Thank you for contributing to ANISE! -->
39 changes: 9 additions & 30 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
workflow_dispatch:

jobs:
type2_chebyshev:
name: JPL DE Benchmark
ephem_type2_chebyshev:
name: SPICE versus ANISE Benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -28,38 +28,17 @@ jobs:
- name: Install CSPICE
run: sh dev-env-setup.sh && cd .. # Return to root

- name: Bench
- name: Bench JPL Ephemerides
run: cargo bench --bench "*_jpl_ephemerides"

- name: Save benchmark artifacts
uses: actions/upload-artifact@v3
with:
name: jpl-development-ephemerides-benchmark
path: target/criterion/**/report/*

type13_hermite:
name: Hermite Benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
lfs: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install CSPICE
run: sh dev-env-setup.sh && cd .. # Return to root

- name: Bench

- name: Bench Spacecraft (Hermite type 13)
run: cargo bench --bench "*_spacecraft_ephemeris"

- name: Bench Binary planetary constants
run: cargo bench --bench "crit_bpc_rotation"

- name: Save benchmark artifacts
uses: actions/upload-artifact@v3
with:
name: spacecraft-ephemeris-benchmark
name: jpl-development-ephemerides-benchmark
path: target/criterion/**/report/*
20 changes: 14 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,18 @@ jobs:
cargo run -- inspect data/de440.bsp
- name: Rust-SPICE JPL DE validation
run: |
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde_de440s --features spkezr_validation --release -- --nocapture --ignored
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde_de440_full --features spkezr_validation --release -- --nocapture --ignored
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_jplde --features spkezr_validation --release -- --nocapture --include-ignored --test-threads 1

- name: Rust-SPICE hermite validation
run: |
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_from_gmat --features spkezr_validation --release -- --nocapture --ignored
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_with_varying_segment_sizes --features spkezr_validation --release -- --nocapture --ignored
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_hermite_type13_ --features spkezr_validation --release -- --nocapture --include-ignored --test-threads 1

- name: Rust-SPICE PCK validation
run: RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_iau_rotation_to_parent --release -- --nocapture --ignored

- name: Rust-SPICE BPC validation
run: |
RUST_BACKTRACE=1 RUST_LOG=debug cargo test validate_bpc_ --release -- --nocapture --include-ignored --test-threads 1
RUST_BACKTRACE=1 RUST_LOG=debug cargo test de440s_translation_verif_venus2emb --release -- --nocapture --include-ignored --test-threads 1
# Now analyze the results and create pretty plots
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -172,6 +176,10 @@ jobs:
cargo llvm-cov clean --workspace
cargo llvm-cov test --no-report -- --test-threads=1
cargo llvm-cov test --no-report --tests -- compile_fail
cargo llvm-cov test --no-report validate_iau_rotation_to_parent -- --nocapture --ignored
cargo llvm-cov test --no-report validate_bpc_to_iau_rotations -- --nocapture --ignored
cargo llvm-cov test --no-report validate_jplde_de440s --features spkezr_validation -- --nocapture --ignored
cargo llvm-cov test --no-report validate_hermite_type13_from_gmat --features spkezr_validation -- --nocapture --ignored
cargo llvm-cov report --lcov > lcov.txt
env:
RUSTFLAGS: --cfg __ui_tests
Expand Down
62 changes: 62 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cargo",
"command": "test",
"args": [
"validate_bpc_",
"--",
"--nocapture",
"--include-ignored",
"--test-threads",
"1",
],
"problemMatcher": [
"$rustc"
],
"group": "none",
"label": "ANISE: BPC validation"
},
{
"type": "cargo",
"command": "test",
"args": [
"validate_hermite_type13_",
"--features",
"spkezr_validation",
"--release",
"--",
"--nocapture",
"--include-ignored",
"--test-threads",
"1",
],
"problemMatcher": [
"$rustc"
],
"group": "none",
"label": "ANISE: SPK Hermite validation"
},
{
"type": "cargo",
"command": "test",
"args": [
"validate_jplde",
"--features",
"spkezr_validation",
"--release",
"--",
"--nocapture",
"--include-ignored",
"--test-threads",
"1",
],
"problemMatcher": [
"$rustc"
],
"group": "none",
"label": "ANISE: SPK Chebyshev validation"
}
]
}
46 changes: 29 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,45 @@ keywords = ["attitude", "navigation", "instrument", "spacecraft", "ephemeris"]
categories = ["science", "simulation"]
readme = "README.md"
license = "MPL-2.0"
exclude = ["cspice"]
exclude = [
"cspice*",
"data",
"analysis",
".vscode",
".github",
".venv",
".vscode",
"*.sh",
]

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

[dependencies]
hifitime = "3.8"
memmap2 = "0.9.0"
crc32fast = "1.3.0"
memmap2 = "=0.9.0"
crc32fast = "=1.3.2"
der = { version = "0.7.8", features = ["derive", "alloc", "real"] }
clap = { version = "3.1", features = ["derive"] }
thiserror = "1.0"
log = "0.4"
pretty_env_logger = "0.5"
tabled = "0.14"
clap = { version = "4", features = ["derive"] }
log = "=0.4"
pretty_env_logger = "=0.5"
tabled = "=0.14"
const_format = "0.2"
nalgebra = "0.32"
approx = "0.5.1"
zerocopy = { version = "0.7.3", features = ["derive"] }
bytes = "1.4.0"
snafu = { version = "0.7.4", features = ["backtrace"] }
approx = "=0.5.1"
zerocopy = { version = "0.7.26", features = ["derive"] }
bytes = "=1.4.0"
snafu = { version = "0.7.5", features = ["backtrace"] }
lexical-core = "0.8.5"
heapless = "0.8.0"
rstest = "0.18.2"

[dev-dependencies]
rust-spice = "0.7.4"
parquet = "47.0.0"
arrow = "47.0.0"
rust-spice = "0.7.6"
parquet = "49.0.0"
arrow = "49.0.0"
criterion = "0.5"
iai = "0.1"
polars = { version = "0.34", features = ["lazy", "parquet"] }
polars = { version = "0.34.2", features = ["lazy", "parquet"] }
rayon = "1.7"

[features]
Expand All @@ -61,5 +69,9 @@ name = "crit_jpl_ephemerides"
harness = false

[[bench]]
name = "iai_spacecraft_ephemeris"
name = "crit_spacecraft_ephemeris"
harness = false

[[bench]]
name = "crit_bpc_rotation"
harness = false
Loading

0 comments on commit 852c63f

Please sign in to comment.