Skip to content

ThrusterSpec

Defined in: thruster.rs:90

pub struct ThrusterSpec {
pub thrust_n: f64,
pub isp_s: f64,
pub direction_body: nalgebra::Vector3<f64>,
pub offset_body: nalgebra::Vector3<f64>,
pub dry_mass: f64,
}

Static physical parameters of a single thruster.

Separates the hardware specification (thrust, Isp, geometry) from control logic (ThrustProfile). Both Thruster (host-scheduled) and ThrusterAssembly (plugin-commanded) delegate their physics calculation to ThrusterSpec::loads_for_throttle.

thrust_n: f64

Maximum thrust [N].


isp_s: f64

Specific impulse [s].


direction_body: nalgebra::Vector3<f64>

Thrust direction in body frame (unit vector).


offset_body: nalgebra::Vector3<f64>

Thruster position offset from CoM [m, body frame].


dry_mass: f64

Dry mass [kg] — failsafe floor (thrust ceases when mass ≤ dry_mass).


fn new(thrust_n: f64, isp_s: f64, direction_body: Vector3<f64>) -> Self

Create a thruster spec with the given maximum thrust, specific impulse, and body-frame direction.

Defaults: offset = 0 (CoM), dry_mass = 0.

Panics if direction_body is zero-length.


fn with_offset(self, offset: Vector3<f64>) -> Self

Set the thruster offset from the spacecraft centre of mass [m, body frame].


fn with_dry_mass(self, dry_mass: f64) -> Self

Set the dry mass floor [kg].


fn loads_for_throttle(&self, throttle: f64, state: &SpacecraftState, _epoch: [Option<&Epoch>](https://doc.rust-lang.org/std/option/enum.Option.html)) -> ExternalLoads

Compute loads for a given throttle level.

throttle is clamped to [0, 1]. Returns zero loads when state.mass ≤ dry_mass (propellant exhausted).