Table of Contents

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

MTBDipoleCmdMessage

In_MagneticFieldMsg

[MagneticFieldMessage] Reference to the magnetic field at the body

public MagneticFieldMessage? In_MagneticFieldMsg

Field Value

MagneticFieldMessage

Out_MTBArrayNetTorqueMsg

[MtbArrayNetTorqueMsg] Output message containing the net torques produced by the torque bars in the body frame

public MTBArrayNetTorqueMessage Out_MTBArrayNetTorqueMsg

Field Value

MTBArrayNetTorqueMessage

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

Vector3

Mass

The mass of the magnetic torque bar array, excluding child objects.

public override double Mass { get; set; }

Property Value

double

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

Matrix3

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

Vector3

NumMTB

[-] Number of magnetic torque bars on the spacecraft

[EditableVariable("-", true, "", "")]
public int NumMTB { get; }

Property Value

int

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 MTBConfigMessage

The torque bar message to add

Returns

MagneticTorqueBar

CreateMagneticTorqueBar(double, Vector3)

Adds a new magnetic torque rod to the array

public MagneticTorqueBar CreateMagneticTorqueBar(double maxMTBDipoles, Vector3 gtMatrix_B)

Parameters

maxMTBDipoles double

Maximum dipole of Mtb

gtMatrix_B Vector3

Steering Matrix

Returns

MagneticTorqueBar

IsChildTypeSupported(Type)

Returns true if 'Component' type is a supported child

protected override bool IsChildTypeSupported(Type type)

Parameters

type Type

a 'Component' type

Returns

bool

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 double

current time (seconds)

OnPostAttachChild(Component)

Called after the 'Component' has attached a component

protected override void OnPostAttachChild(Component child)

Parameters

child Component

The child component

OnPostDetachChild(Component)

Called after the 'Component' has detached a component

protected override void OnPostDetachChild(Component child)

Parameters

child Component

The child component

OnPreAttachChild(Component)

Called before the 'Component' attaches a component

protected override void OnPreAttachChild(Component child)

Parameters

child Component

The child component

OnPreDetachChild(Component)

Called before the 'Component' detaches a component

protected override void OnPreDetachChild(Component child)

Parameters

child Component

The child component

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)

ReadInputs()

Reads inputs from messages and stores them in variables

protected override void ReadInputs()