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

Add rotation computation using planetary data and PCK/BPC files #120

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
eac5672
Lifetime issues when decoding DataSet
ChristopherRabotin Sep 27, 2023
53fc71e
Refactor dataset into its own module
ChristopherRabotin Sep 27, 2023
5bed0b0
Skipping decoding string until help arrives on https://github.com/Rus…
ChristopherRabotin Sep 27, 2023
45e3868
Initial work for DCM rotation to parent
ChristopherRabotin Oct 1, 2023
c369ef6
Validate IAU Earth rotation to parent
ChristopherRabotin Oct 3, 2023
bbb1e82
Validate IAU Jupiter rotation to parent
ChristopherRabotin Oct 3, 2023
2079d79
Add euler param data to Almanac
ChristopherRabotin Oct 3, 2023
ff3f376
Add PR template
ChristopherRabotin Oct 3, 2023
22b2bb0
(m) remove the thanks from the printed template
ChristopherRabotin Oct 3, 2023
2018fd5
Issue with PCK 00011, WIP
ChristopherRabotin Oct 4, 2023
b8b97cf
Issues with system nut/prec angles
ChristopherRabotin Oct 5, 2023
bbf4da0
Remove debug messages after #112
ChristopherRabotin Oct 5, 2023
bf1a233
Add coverage for validation cases
ChristopherRabotin Oct 6, 2023
f9b0ac3
Replace NutPrecAngle with PhaseAngle
ChristopherRabotin Oct 6, 2023
03b3698
PlanetaryData is large now that it uses PhaseAngle<0>
ChristopherRabotin Oct 6, 2023
cbbee95
Missed one
ChristopherRabotin Oct 6, 2023
79d208f
Switch MetaData to use owned String
ChristopherRabotin Oct 6, 2023
1056276
Cancelling refactor to Strings
ChristopherRabotin Oct 7, 2023
474d097
Merge branch '33-high-fidelity-rotation-information-binary-pck-conver…
ChristopherRabotin Oct 7, 2023
f3dcb9a
Idem
ChristopherRabotin Oct 7, 2023
34ba1b2
Idem
ChristopherRabotin Oct 7, 2023
4024770
Find orientation root
ChristopherRabotin Oct 7, 2023
071a77f
Switch to heapless String
ChristopherRabotin Oct 14, 2023
cdf5baa
DataSet now only works for Owner types
ChristopherRabotin Oct 14, 2023
38540f1
Remove comments from Spacecraft data
ChristopherRabotin Oct 15, 2023
e1a0e01
Cleanup and add name based indexing
ChristopherRabotin Oct 15, 2023
9d4b67a
Update buf size of demo dataset
ChristopherRabotin Oct 15, 2023
41aba64
Add DAF data type enum after realizing that the structure is shared b…
ChristopherRabotin Oct 17, 2023
48a00ab
Move datatype to DAF module
ChristopherRabotin Oct 17, 2023
55e6742
Chebyshev Type 2 BPC supported in theory
ChristopherRabotin Oct 17, 2023
c889632
Ha, it turned out that my validation cases were wrong!
ChristopherRabotin Oct 18, 2023
f8d777b
Add rotation benchmark
ChristopherRabotin Oct 18, 2023
0b04aa0
Collate benchmarks
ChristopherRabotin Oct 22, 2023
7152000
Add ECLIPJ2000 to J2000
ChristopherRabotin Oct 22, 2023
059df19
Update to rust-spice 0.7.6
ChristopherRabotin Oct 22, 2023
244dad5
Add DCM derivative in BPC test
ChristopherRabotin Oct 22, 2023
896ed14
Implement finite diff for DCM derivative for PCKs
ChristopherRabotin Oct 22, 2023
1997ca7
Merge branch 'master' into 33-high-fidelity-rotation-information-bina…
ChristopherRabotin Oct 22, 2023
9d8e1fb
BPC DCM derivative error is much tighter than PCK derivative
ChristopherRabotin Oct 22, 2023
c10ee50
Remove unused euler313 function
ChristopherRabotin Oct 22, 2023
22b2e28
WIP on composition of rotations
ChristopherRabotin Oct 26, 2023
d1d14b2
Fix two-hop rotations
ChristopherRabotin Oct 29, 2023
544947f
Add transport theorem for DCM computations
ChristopherRabotin Oct 29, 2023
a7ba87e
Fix paths when rotating from two sides, but issue in validation
ChristopherRabotin Oct 29, 2023
15aa666
Validate BPC to IAU rotations!
ChristopherRabotin Oct 29, 2023
d0cc5ac
Fixed rotation bug if dcm_fwrd was identity
ChristopherRabotin Oct 29, 2023
d9f95fd
Adding the transformation functions
ChristopherRabotin Oct 29, 2023
79bffc6
Need to fix the external state transformation
ChristopherRabotin Oct 29, 2023
cd9d96d
Update README
ChristopherRabotin Oct 29, 2023
a6fa689
Found bug in rotations, will fix later
ChristopherRabotin Oct 30, 2023
13cc362
Committing fixes to rotations
ChristopherRabotin Nov 8, 2023
3fcf3db
Update path computations for orientations
ChristopherRabotin Nov 8, 2023
54b05c5
Transformation is not correct yet
ChristopherRabotin Nov 8, 2023
0a32885
Fix transport theorem in DCM multiplication
ChristopherRabotin Nov 9, 2023
9ae31b7
Glitch in validation because Almanac does not know that orientation 3…
ChristopherRabotin Nov 9, 2023
60e3d03
Add VSCode tasks for validation
ChristopherRabotin Nov 12, 2023
c003a1b
Fixed two-way rotations via shared common nodes
ChristopherRabotin Nov 16, 2023
4a1d85c
Alter tolerance and reenable all IAU to BPC tests
ChristopherRabotin Nov 16, 2023
6cfa546
Add docs
ChristopherRabotin Nov 16, 2023
715f56d
Froze dependencies
ChristopherRabotin Nov 16, 2023
13db430
Merge branch 'master' into 33-high-fidelity-rotation-information-bina…
ChristopherRabotin Nov 16, 2023
6f44c0d
Fix test flags and update heapless and parquet
ChristopherRabotin Nov 16, 2023
034539f
Fix tests for heapless 0.8
ChristopherRabotin Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading