Table of Contents

Class ThrusterMappingSoftware

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

Defines the thruster mapping software. This module takes a desired torque to control the spacecraft, and maps it to an array of thrusters.

public class ThrusterMappingSoftware : Software
Inheritance
ThrusterMappingSoftware
Inherited Members

Constructors

ThrusterMappingSoftware()

Default constructor for the software

public ThrusterMappingSoftware()

Fields

AngleErrorThreshold

[rad] Angular error at which thruster forces are scaled to not be super-saturated

public double AngleErrorThreshold

Field Value

double

ControlAxes_B

[-] Array of the control unit axes

public Matrix3 ControlAxes_B

Field Value

Matrix3

Epsilon

[-] Variable specifying what is considered a small number

public double Epsilon

Field Value

double

In_CmdTorqueBodyMsg

Commanded spacecraft external control torque message

public CmdTorqueBodyMessage In_CmdTorqueBodyMsg

Field Value

CmdTorqueBodyMessage

In_ThrusterArrayConfigMsg

Configuration of thrusters attached to the spacecraft

public ThrusterArrayConfigMessage In_ThrusterArrayConfigMsg

Field Value

ThrusterArrayConfigMessage

In_VehicleConfigMsg

Vehicle configuration input message. Gets component's parent if null.

public VehicleConfigMessage In_VehicleConfigMsg

Field Value

VehicleConfigMessage

Out_ThrustForceCmdArrayMsg

Output thruster force commands for thruster array

public ThrusterArrayCmdForceMessage Out_ThrustForceCmdArrayMsg

Field Value

ThrusterArrayCmdForceMessage

ThrusterForceSign

[-] Flag indicating if pos (+1) or negative (-1) thruster solutions are found

public int ThrusterForceSign

Field Value

int

Use2ndLoop

[-] Flag indicating if the 2nd least squares fitting loop should be used

public bool Use2ndLoop

Field Value

bool

Properties

OutTorqueAngleError

[rad] Angular error of the effector torque

public double OutTorqueAngleError { get; }

Property Value

double

ThrustForceMagnitude

[N] Vector of Thrust Force Magnitudes

public Vector ThrustForceMagnitude { get; }

Property Value

Vector

Methods

ComputeTorqueAngleError(Matrix, Vector3, int, Vector, Vector)

Determine the angle between the desired torque vector and the actual torque vector

protected double ComputeTorqueAngleError(Matrix D, Vector3 BLr_B, int NumForces, Vector F, Vector FMag)

Parameters

D Matrix
BLr_B Vector3
NumForces int
F Vector
FMag Vector

Returns

double

FindMinimumNormForce(Matrix, Vector3, int)

Use a least square inverse to determine the smallest set of thruster forces that yield the desired torque vector.
Note that this routine does not constrain yet the forces to be either positive or negative

protected Vector FindMinimumNormForce(Matrix D, Vector3 Lr_B_Bar, int NumForces)

Parameters

D Matrix
Lr_B_Bar Vector3
NumForces int

Returns

Vector

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

current time (seconds)

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)

SubtractMin(Vector, int)

Take a stack of force values find the smallest value, and subtract if from all force values. Here the smallest values will become zero, while other forces increase.
Assumption: Thrusters are aligned such that if all thrusters are firing, then no torque or force is applied.
This ensures only positive force values are computed.

protected Vector SubtractMin(Vector F, int size)

Parameters

F Vector
size int

Returns

Vector