Skip to content

ThrusterSpec

Defined in: thruster.rs:157

pub struct ThrusterSpec {
pub thrust_n: f64,
pub isp_s: f64,
pub direction_body: nalgebra::Vector3<f64>,
pub offset_body: nalgebra::Vector3<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].


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).

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 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]. Whether there is propellant left to burn is not asked here: the spacecraft’s PropellantPool(super::PropellantPool) owns that, and the system that holds this thruster is what stops asking once the pool is empty.