Skip to content

Commit 1ec99a9

Browse files
Fix OD residual plotting + clippy
1 parent 9c22b15 commit 1ec99a9

File tree

10 files changed

+12
-20
lines changed

10 files changed

+12
-20
lines changed

examples/04_lro_od/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn main() -> Result<(), Box<dyn Error>> {
256256
SNC3::from_diagonal(10 * Unit::Minute, &[1e-12, 1e-12, 1e-12]),
257257
);
258258

259-
// We'll set up the OD process to reject measurements whose residuals are mover than 4 sigmas away from what we expect.
259+
// We'll set up the OD process to reject measurements whose residuals are move than 3 sigmas away from what we expect.
260260
let mut odp = SpacecraftODProcess::ckf(
261261
setup.with(initial_estimate.state().with_stm(), almanac.clone()),
262262
kf,

examples/04_lro_od/plot_od_rslt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def main(path: str):
1515
df = (
1616
df.with_columns(pl.col("Epoch (UTC)").str.to_datetime("%Y-%m-%dT%H:%M:%S%.f"))
1717
.sort("Epoch (UTC)", descending=False)
18-
.with_columns(df["Residual ratio"].fill_null(0.0).alias("Residual ratio"))
1918
)
2019

2120
all_msr_types = ["Range (km)", "Doppler (km/s)", "Azimuth (deg)", "Elevation (deg)"]
@@ -40,7 +39,7 @@ def main(path: str):
4039
)
4140

4241
# Convert the Polars column to a NumPy array for compatibility with scipy and Plotly
43-
residual_ratio = df["Residual ratio"].to_numpy()
42+
residual_ratio = df["Residual ratio"].drop_nulls().to_numpy()
4443

4544
# Create QQ plot
4645
qq = stats.probplot(residual_ratio)

src/dynamics/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ pub mod orbital;
3939
use self::guidance::GuidanceError;
4040
pub use self::orbital::*;
4141

42-
/// The gravity module handles spherical harmonics only. It _must_ be combined with a OrbitalDynamics dynamics
43-
///
44-
/// This module allows loading gravity models from [PDS](http://pds-geosciences.wustl.edu/), [EGM2008](http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/) and GMAT's own COF files.
45-
// pub mod gravity;
46-
4742
/// The spacecraft module allows for simulation of spacecraft dynamics in general, including propulsion/maneuvers.
4843
pub mod spacecraft;
4944
pub use self::spacecraft::*;
@@ -63,6 +58,7 @@ pub mod drag;
6358
pub use self::drag::*;
6459

6560
/// Define the spherical harmonic models.
61+
/// This module allows loading gravity models from [PDS](http://pds-geosciences.wustl.edu/), [EGM2008](http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/) and GMAT's own COF files.
6662
pub mod sph_harmonics;
6763
pub use self::sph_harmonics::*;
6864

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ pub mod io;
5151
/// All the orbital determination and spacecraft navigation tools and functions.
5252
pub mod od;
5353

54-
/// Navigation submodule, relevant to both ground based navigation (orbit determination) and onboard navigation (part of the Guidance, Navigation and Control subsystem)
55-
// pub mod nav;
56-
5754
/// All of the mission design and mission analysis tools and functions
5855
pub mod md;
5956

src/md/opti/multipleshooting/multishoot.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub struct MultipleShooting<'a, T: MultishootNode<OT>, const VT: usize, const OT
5959
pub all_dvs: Vec<SVector<f64, VT>>,
6060
}
6161

62-
impl<'a, T: MultishootNode<OT>, const VT: usize, const OT: usize> MultipleShooting<'a, T, VT, OT> {
62+
impl<T: MultishootNode<OT>, const VT: usize, const OT: usize> MultipleShooting<'_, T, VT, OT> {
6363
/// Solve the multiple shooting problem by finding the arrangement of nodes to minimize the cost function.
6464
pub fn solve(
6565
&mut self,
@@ -278,8 +278,8 @@ impl<'a, T: MultishootNode<OT>, const VT: usize, const OT: usize> MultipleShooti
278278
}
279279
}
280280

281-
impl<'a, T: MultishootNode<OT>, const VT: usize, const OT: usize> fmt::Display
282-
for MultipleShooting<'a, T, VT, OT>
281+
impl<T: MultishootNode<OT>, const VT: usize, const OT: usize> fmt::Display
282+
for MultipleShooting<'_, T, VT, OT>
283283
{
284284
#[allow(clippy::or_fun_call, clippy::clone_on_copy)]
285285
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

src/md/opti/raphson_finite_diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use snafu::{ensure, ResultExt};
3333
#[cfg(not(target_arch = "wasm32"))]
3434
use std::time::Instant;
3535

36-
impl<'a, const V: usize, const O: usize> Targeter<'a, V, O> {
36+
impl<const V: usize, const O: usize> Targeter<'_, V, O> {
3737
/// Differential correction using finite differencing
3838
#[allow(clippy::comparison_chain)]
3939
pub fn try_achieve_fd(

src/md/opti/raphson_hyperdual.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use crate::utils::are_eigenvalues_stable;
3030
#[cfg(not(target_arch = "wasm32"))]
3131
use std::time::Instant;
3232

33-
impl<'a, const V: usize, const O: usize> Targeter<'a, V, O> {
33+
impl<const V: usize, const O: usize> Targeter<'_, V, O> {
3434
/// Differential correction using hyperdual numbers for the objectives
3535
#[allow(clippy::comparison_chain)]
3636
pub fn try_achieve_dual(

src/md/opti/targeter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct Targeter<'a, const V: usize, const O: usize> {
4848
pub iterations: usize,
4949
}
5050

51-
impl<'a, const V: usize, const O: usize> fmt::Display for Targeter<'a, V, O> {
51+
impl<const V: usize, const O: usize> fmt::Display for Targeter<'_, V, O> {
5252
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5353
let mut objmsg = String::from("");
5454
for obj in &self.objectives {

src/od/process/export.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ use std::path::{Path, PathBuf};
4242

4343
use super::ODProcess;
4444

45-
impl<'a, MsrSize: DimName, Accel: DimName, Trk: TrackerSensitivity<Spacecraft, Spacecraft>>
46-
ODProcess<'a, SpacecraftDynamics, MsrSize, Accel, KF<Spacecraft, Accel, MsrSize>, Trk>
45+
impl<MsrSize: DimName, Accel: DimName, Trk: TrackerSensitivity<Spacecraft, Spacecraft>>
46+
ODProcess<'_, SpacecraftDynamics, MsrSize, Accel, KF<Spacecraft, Accel, MsrSize>, Trk>
4747
where
4848
DefaultAllocator: Allocator<MsrSize>
4949
+ Allocator<MsrSize, <Spacecraft as State>::Size>

src/propagators/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ where
6060
pub(crate) k: Vec<OVector<f64, <D::StateType as State>::VecLength>>,
6161
}
6262

63-
impl<'a, D: Dynamics> PropInstance<'a, D>
63+
impl<D: Dynamics> PropInstance<'_, D>
6464
where
6565
DefaultAllocator: Allocator<<D::StateType as State>::Size>
6666
+ Allocator<<D::StateType as State>::Size, <D::StateType as State>::Size>

0 commit comments

Comments
 (0)