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
ControlAxes_B
[-] Array of the control unit axes
public Matrix3 ControlAxes_B
Field Value
Epsilon
[-] Variable specifying what is considered a small number
public double Epsilon
Field Value
In_CmdTorqueBodyMsg
Commanded spacecraft external control torque message
public CmdTorqueBodyMessage In_CmdTorqueBodyMsg
Field Value
In_ThrusterArrayConfigMsg
Configuration of thrusters attached to the spacecraft
public ThrusterArrayConfigMessage In_ThrusterArrayConfigMsg
Field Value
In_VehicleConfigMsg
Vehicle configuration input message. Gets component's parent if null.
public VehicleConfigMessage In_VehicleConfigMsg
Field Value
Out_ThrustForceCmdArrayMsg
Output thruster force commands for thruster array
public ThrusterArrayCmdForceMessage Out_ThrustForceCmdArrayMsg
Field Value
ThrusterForceSign
[-] Flag indicating if pos (+1) or negative (-1) thruster solutions are found
public int ThrusterForceSign
Field Value
Use2ndLoop
[-] Flag indicating if the 2nd least squares fitting loop should be used
public bool Use2ndLoop
Field Value
Properties
OutTorqueAngleError
[rad] Angular error of the effector torque
public double OutTorqueAngleError { get; }
Property Value
ThrustForceMagnitude
[N] Vector of Thrust Force Magnitudes
public Vector ThrustForceMagnitude { get; }
Property Value
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
Returns
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
Returns
OnBegin(double)
Called when the 'Component' is beginning
protected override void OnBegin(double time)
Parameters
time
doublecurrent time (seconds)
OnUpdate(double, double)
Called when the 'Component' should update
protected override void OnUpdate(double time, double step)
Parameters
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)