pub struct Maneuver {
pub start: Epoch,
pub end: Epoch,
pub thrust_prct: f64,
pub representation: MnvrRepr,
pub frame: LocalFrame,
}
Expand description
Mnvr defined a single maneuver. Direction MUST be in the VNC frame (Velocity / Normal / Cross). It may be used with a maneuver scheduler.
Fields§
§start: Epoch
Start epoch of the maneuver
end: Epoch
End epoch of the maneuver
thrust_prct: f64
TODO: Add a thruster group set to specify which set of thrusters to use for this maneuver, should be a key to a thruster (maybe change thruster to a hashmap actually now that I don’t care about embedded stuff). Thrust level, if 1.0 use all thruster available at full power TODO: Convert this to a common polynomial as well to optimize throttle, throttle rate (and accel?)
representation: MnvrRepr
The representation of this maneuver.
frame: LocalFrame
The frame in which the maneuvers are defined.
Implementations§
Source§impl Maneuver
impl Maneuver
Sourcepub fn from_impulsive(
dt: Epoch,
vector: Vector3<f64>,
frame: LocalFrame,
) -> Self
pub fn from_impulsive( dt: Epoch, vector: Vector3<f64>, frame: LocalFrame, ) -> Self
Creates an impulsive maneuver whose vector is the deltaV. TODO: This should use William’s algorithm
Sourcepub fn from_time_invariant(
start: Epoch,
end: Epoch,
thrust_lvl: f64,
vector: Vector3<f64>,
frame: LocalFrame,
) -> Self
pub fn from_time_invariant( start: Epoch, end: Epoch, thrust_lvl: f64, vector: Vector3<f64>, frame: LocalFrame, ) -> Self
Creates a maneuver from the provided time-invariant delta-v, in km/s
Sourcepub fn vector(&self, epoch: Epoch) -> Vector3<f64>
pub fn vector(&self, epoch: Epoch) -> Vector3<f64>
Return the thrust vector computed at the provided epoch
Sourcepub fn antichronological(&self) -> bool
pub fn antichronological(&self) -> bool
Return whether this is an antichronological maneuver
Sourcepub fn direction(&self) -> Vector3<f64>
pub fn direction(&self) -> Vector3<f64>
Returns the direction of the burn at the start of the burn, useful for setting new angles
Sourcepub fn set_direction(
&mut self,
vector: Vector3<f64>,
) -> Result<(), GuidanceError>
pub fn set_direction( &mut self, vector: Vector3<f64>, ) -> Result<(), GuidanceError>
Set the time-invariant direction for this finite burn while keeping the other components as they are
Sourcepub fn rate(&self) -> Vector3<f64>
pub fn rate(&self) -> Vector3<f64>
Returns the rate of direction of the burn at the start of the burn, useful for setting new angles
Sourcepub fn set_rate(&mut self, rate: Vector3<f64>) -> Result<(), GuidanceError>
pub fn set_rate(&mut self, rate: Vector3<f64>) -> Result<(), GuidanceError>
Set the rate of direction for this finite burn while keeping the other components as they are
Sourcepub fn accel(&self) -> Vector3<f64>
pub fn accel(&self) -> Vector3<f64>
Returns the acceleration of the burn at the start of the burn, useful for setting new angles
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Maneuver
impl<'de> Deserialize<'de> for Maneuver
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl GuidanceLaw for Maneuver
impl GuidanceLaw for Maneuver
Source§fn direction(&self, osc: &Spacecraft) -> Result<Vector3<f64>, GuidanceError>
fn direction(&self, osc: &Spacecraft) -> Result<Vector3<f64>, GuidanceError>
Source§fn throttle(&self, osc: &Spacecraft) -> Result<f64, GuidanceError>
fn throttle(&self, osc: &Spacecraft) -> Result<f64, GuidanceError>
Source§fn next(&self, sc: &mut Spacecraft, _almanac: Arc<Almanac>)
fn next(&self, sc: &mut Spacecraft, _almanac: Arc<Almanac>)
Source§fn achieved(&self, _osc_state: &Spacecraft) -> Result<bool, GuidanceError>
fn achieved(&self, _osc_state: &Spacecraft) -> Result<bool, GuidanceError>
impl Copy for Maneuver
impl StructuralPartialEq for Maneuver
Auto Trait Implementations§
impl Freeze for Maneuver
impl RefUnwindSafe for Maneuver
impl Send for Maneuver
impl Sync for Maneuver
impl Unpin for Maneuver
impl UnwindSafe for Maneuver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.