Class MagneticTorqueBarArray
- Namespace
- NominalSystems.Classes
- Assembly
- NominalSystems.Classes.dll
Holds the functionality for a Magnetic Torque Rod that can interact with the magnetic field.
public class MagneticTorqueBarArray : DynamicEffector
- Inheritance
-
MagneticTorqueBarArray
- Inherited Members
Constructors
MagneticTorqueBarArray()
Constructo that ensures that the mass is not available for this array component.
public MagneticTorqueBarArray()
Fields
In_MTBDipoleCmdMsg
[MtbDipoleCmdMsg] Reference to the dipole commands for the MTB array
public MTBDipoleCmdMessage? In_MTBDipoleCmdMsg
Field Value
In_MagneticFieldMsg
[MagneticFieldMessage] Reference to the magnetic field at the body
public MagneticFieldMessage? In_MagneticFieldMsg
Field Value
Out_MTBArrayNetTorqueMsg
[MtbArrayNetTorqueMsg] Output message containing the net torques produced by the torque bars in the body frame
public MTBArrayNetTorqueMessage Out_MTBArrayNetTorqueMsg
Field Value
Properties
CenterOfMassL_L
[m] The center of mass of the component within its own local
coordinates. This does not include any of the sub-components.
Overridden to always return Vector3(0,0,0)
public override Vector3 CenterOfMassL_L { get; set; }
Property Value
Mass
The mass of the magnetic torque bar array, excluding child objects.
public override double Mass { get; set; }
Property Value
MomentOfInertiaL_L
[kg m^2] The moment of inertia of the component within its own
local coordinates. This does not include any of the sub-components.
Overriden to always return a Matrix of 0.
public override Matrix3 MomentOfInertiaL_L { get; set; }
Property Value
NetTorque_B
[Nm] Net torque contribution of all magnetic torque bars in Body frame components
[EditableVariable("Nm", true, "", "")]
public Vector3 NetTorque_B { get; set; }
Property Value
NumMTB
[-] Number of magnetic torque bars on the spacecraft
[EditableVariable("-", true, "", "")]
public int NumMTB { get; }
Property Value
Methods
ComputeForceTorque(double)
Method to computeForce and torque on the body
public override void ComputeForceTorque(double time)
Parameters
time
double[s] The integrator time
CreateMagneticTorqueBar(MTBConfigMessage)
Adds a new magnetic torque rod to the array
public MagneticTorqueBar CreateMagneticTorqueBar(MTBConfigMessage mtbMessage)
Parameters
mtbMessage
MTBConfigMessageThe torque bar message to add
Returns
CreateMagneticTorqueBar(double, Vector3)
Adds a new magnetic torque rod to the array
public MagneticTorqueBar CreateMagneticTorqueBar(double maxMTBDipoles, Vector3 gtMatrix_B)
Parameters
Returns
IsChildTypeSupported(Type)
Returns true if 'Component' type is a supported child
protected override bool IsChildTypeSupported(Type type)
Parameters
type
Typea 'Component' type
Returns
LinkInStates(StateProperties)
Method to access other states or properties
public override void LinkInStates(StateProperties properties)
Parameters
properties
StateProperties
OnBegin(double)
Called when the 'Component' is beginning
protected override void OnBegin(double time)
Parameters
time
doublecurrent time (seconds)
OnPostAttachChild(Component)
Called after the 'Component' has attached a component
protected override void OnPostAttachChild(Component child)
Parameters
child
ComponentThe child component
OnPostDetachChild(Component)
Called after the 'Component' has detached a component
protected override void OnPostDetachChild(Component child)
Parameters
child
ComponentThe child component
OnPreAttachChild(Component)
Called before the 'Component' attaches a component
protected override void OnPreAttachChild(Component child)
Parameters
child
ComponentThe child component
OnPreDetachChild(Component)
Called before the 'Component' detaches a component
protected override void OnPreDetachChild(Component child)
Parameters
child
ComponentThe child component
OnUpdate(double, double)
Called when the 'Component' should update
protected override void OnUpdate(double time, double step)
Parameters
ReadInputs()
Reads inputs from messages and stores them in variables
protected override void ReadInputs()