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

Fix some typos #115

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Outstanding mission design features available [here](https://gitlab.com/chrisrab
## Celestial computations
- [x] Orbital state manipulation
- [x] Planetary and Solar eclipse and visibility computation
- [x] Light-time corrections and abberations
- [x] Light-time corrections and aberrations
- [x] Frame rotations

# Who am I?
Expand Down
2 changes: 1 addition & 1 deletion src/cosmic/cosm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub enum LightTimeCalc {
None,
/// Accounts for light-time correction. This is corresponds to CN in SPICE.
LightTime,
/// Accounts for light-time and stellar abberation where the solar system barycenter is the inertial frame. Corresponds to CN+S in SPICE.
/// Accounts for light-time and stellar aberration where the solar system barycenter is the inertial frame. Corresponds to CN+S in SPICE.
Abberation,
}

Expand Down
2 changes: 1 addition & 1 deletion src/cosmic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ where
}

/// Allows setting the value of the given parameter.
/// NOTE: Most paramaters where the `value` is available CANNOT be also set for that parameter (it's a much harder problem!)
/// NOTE: Most parameters where the `value` is available CANNOT be also set for that parameter (it's a much harder problem!)
fn set_value(&mut self, _param: &StateParameter, _val: f64) -> Result<(), NyxError> {
Err(NyxError::StateParameterUnavailable)
}
Expand Down
8 changes: 4 additions & 4 deletions src/cosmic/xb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub struct AttitudeRegistry {
/// states. These time entries are seconds past the start_epoch provided in the
/// higher struct. Perform a binary search in this index to retrieve time key
/// for the desired time. In other words, search for the closest time to the
/// desired time, and retrive the Attitude for this time. Check the repr enum
/// desired time, and retrieve the Attitude for this time. Check the repr enum
/// to understand the attitude representation. If it isn't set, check the
/// comments or discuss with the publisher of the file.
///
Expand Down Expand Up @@ -383,7 +383,7 @@ pub struct AttitudeInterp {
/// interpolated states. These time entries are seconds past the
/// start_mod_julian dates (which is in days). Perform a binary search in this
/// index to retrieve time key for the desired time. In other words, search for
/// the closest time to the desired time, retrive the InterpState for this
/// the closest time to the desired time, retrieve the InterpState for this
/// time, build the interpolation functions, and finally apply these at the
/// desired time.
///
Expand Down Expand Up @@ -488,7 +488,7 @@ pub enum AttitudeRepr {
}
#[derive(Clone, PartialEq, prost::Message)]
pub struct Ephemeris {
/// Nmae of this ephemeris
/// Name of this ephemeris
#[prost(string, tag = "1")]
pub name: prost::alloc::string::String,
/// Name of the orientation frame
Expand Down Expand Up @@ -683,7 +683,7 @@ pub struct VarWindowStates {
/// interpolated states. These time entries are seconds past the start_epoch
/// (defined in the parent Ephemeris object). Perform a binary search in this
/// index to retrieve time key for the desired time. In other words, search for
/// the closest time to the desired time, retrive the InterpState for this
/// the closest time to the desired time, retrieve the InterpState for this
/// time, build the interpolation functions, and finally apply these at the
/// desired time. NOTE: Limitations of protobufs require this index to be an
/// integer. NOTE: For better platform support, these reference times are
Expand Down
6 changes: 3 additions & 3 deletions src/dynamics/guidance/ruggiero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct Ruggiero {
}

/// The Ruggiero is a locally optimal guidance law of a state for specific osculating elements.
/// NOTE: The efficency parameters for AoP is NOT implemented: the paper's formulation is broken.
/// NOTE: The efficiency parameters for AoP is NOT implemented: the paper's formulation is broken.
/// WARNING: Objectives must be in degrees!
impl Ruggiero {
/// Creates a new Ruggiero locally optimal control as an Arc
Expand Down Expand Up @@ -98,7 +98,7 @@ impl Ruggiero {
}))
}

/// Returns the efficency η ∈ [0; 1] of correcting a specific orbital element at the provided osculating orbit
/// Returns the efficiency η ∈ [0; 1] of correcting a specific orbital element at the provided osculating orbit
pub fn efficency(parameter: &StateParameter, osc_orbit: &Orbit) -> Result<f64, NyxError> {
let e = osc_orbit.ecc();
match parameter {
Expand Down Expand Up @@ -137,7 +137,7 @@ impl Ruggiero {
}
}

/// Computes the weight at which to correct this orbital element, will be zero if the current efficency is below the threshold
/// Computes the weight at which to correct this orbital element, will be zero if the current efficiency is below the threshold
fn weighting(&self, obj: &Objective, osc_orbit: &Orbit, η_threshold: f64) -> f64 {
let init = self.init_state.value(&obj.parameter).unwrap();
let osc = osc_orbit.value(&obj.parameter).unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/io/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl OutputSerde {
#[allow(non_camel_case_types)]
#[derive(Clone, Debug, PartialEq)]
pub struct StateHeader {
/// Stores either the state paramater or the epoch
/// Stores either the state parameter or the epoch
pub param: StateParameter,
pub frame_name: Option<String>,
pub epoch_fmt: Option<EpochFormat>,
Expand Down Expand Up @@ -671,7 +671,7 @@ impl NavSolutionFormatter {
"covar_velocity" => hdrs.push(NavSolutionHeader::Covar_vel),
"estimate" | "nominal" => {
let param = StateParameter::from_str(splt[1].to_lowercase().as_str())
.expect("Unknown paramater");
.expect("Unknown parameter");

let state_hdr = StateHeader {
param,
Expand Down
2 changes: 1 addition & 1 deletion src/nav/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl NavState<Orbit, NoParameters> for OrbitNavState {}
// {
// /// Estimated physical state
// state: X,
// /// Estimated paramaters
// /// Estimated parameters
// parameters: P,
// }

Expand Down
6 changes: 3 additions & 3 deletions src/propagators/error_ctrl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ where

/// A largest error control which effectively computes the largest error at each component
///
/// This is a standard error computation algorithm, but it's argubly bad if the state's components have different units.
/// This is a standard error computation algorithm, but it's arguably bad if the state's components have different units.
/// It calculates the largest local estimate of the error from the integration (`error_est`)
/// given the difference in the candidate state and the previous state (`state_delta`).
/// This error estimator is from the physical model estimator of GMAT
Expand Down Expand Up @@ -78,7 +78,7 @@ impl ErrorCtrl for LargestError {

/// A largest step error control which effectively computes the L1 norm of the provided Vector of size 3
///
/// Note that this error controller should be preferrably be used only with slices of a state with the same units.
/// Note that this error controller should be preferably be used only with slices of a state with the same units.
/// For example, one should probably use this for position independently of using it for the velocity.
/// (Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3033]
#[derive(Clone, Copy)]
Expand Down Expand Up @@ -140,7 +140,7 @@ impl ErrorCtrl for LargestState {

/// An RSS step error control which effectively computes the L2 norm of the provided Vector of size 3
///
/// Note that this error controller should be preferrably be used only with slices of a state with the same units.
/// Note that this error controller should be preferably be used only with slices of a state with the same units.
/// For example, one should probably use this for position independently of using it for the velocity.
/// (Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3045]
#[derive(Clone, Copy)]
Expand Down
8 changes: 4 additions & 4 deletions tests/propagation/stopcond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn stop_cond_3rd_apo() {

assert!(
(180.0 - third_apo.ta()).abs() < 1e-3,
"converged, yet convergence critera not met"
"converged, yet convergence criteria not met"
);
}

Expand Down Expand Up @@ -111,7 +111,7 @@ fn stop_cond_3rd_peri() {

assert!(
third_peri.ta().abs() < 1e-1 || (360.0 - third_peri.ta().abs() < 1e-1),
"converged, yet convergence critera not met"
"converged, yet convergence criteria not met"
);
}

Expand Down Expand Up @@ -229,7 +229,7 @@ fn line_of_nodes() {

assert!(
lon_state.geodetic_longitude().abs() < lon_event.value_precision,
"converged, yet convergence critera not met"
"converged, yet convergence criteria not met"
);
}

Expand Down Expand Up @@ -258,6 +258,6 @@ fn latitude() {

assert!(
(2.0 - lon_state.geodetic_latitude()).abs() < lat_event.value_precision,
"converged, yet convergence critera not met"
"converged, yet convergence criteria not met"
);
}