Table of Contents

Class MagneticTorqueBarArray

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] Holds the functionality for a Magnetic Torque Rod that can interact with the magnetic field.


public class MagneticTorqueBarArray : DynamicEffector
Inheritance
MagneticTorqueBarArray

Constructors

MagneticTorqueBarArray()

Constructor that ensures that the mass is not available for this array component.

protected MagneticTorqueBarArray()

Fields

In_DipoleArrayMsg

Reference to the dipole commands for the MTB array

public DipoleArrayMessage? In_DipoleArrayMsg

Field Value

DipoleArrayMessage

In_MagneticFieldMsg

Reference to the magnetic field at the body

public MagneticFieldMessage? In_MagneticFieldMsg

Field Value

MagneticFieldMessage

Out_MTBArrayConfigMsg

The configuration message containing the magnetic torque bar array configuration.

public MTBArrayConfigMessage? Out_MTBArrayConfigMsg

Field Value

MTBArrayConfigMessage

Out_MTBArrayNetTorqueMsg

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

public MTBArrayNetTorqueMessage? Out_MTBArrayNetTorqueMsg

Field Value

MTBArrayNetTorqueMessage

Properties

Alignments_B

Magnetic torque bar alignment matrix in body frame coordinates, must be provided in row-major format. This is the 'GtMatrix_B'.

[Unit(UnitType.NONE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_MTBArrayConfigMsg")]
public Vector3[] Alignments_B { get; }

Property Value

Vector3[]

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)

[Unit(UnitType.METRE)]
public override Vector3 CenterOfMassL_L { get; set; }

Property Value

Vector3

Mass

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

[Unit(UnitType.KILOGRAM)]
public override double Mass { get; set; }

Property Value

double

MaxDipoles

Maximum dipole moment for each torque bar in the array.

[Unit(UnitType.AMPERE_PER_SQUARE_METRE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_MTBArrayConfigMsg")]
public double[] MaxDipoles { get; }

Property Value

double[]

MomentOfInertia_LB

[kg m^2] The moment of inertia of the component within its own local coordinates. This does not include any of the sub-components.
Overridden to always return a Matrix of 0.

[Unit(UnitType.KILOGRAM_SQUARE_METRE)]
public override Matrix3 MomentOfInertia_LB { get; set; }

Property Value

Matrix3

NumMTB

Number of MTBs added.

[Unit(UnitType.NONE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_MTBArrayConfigMsg")]
public int NumMTB { get; }

Property Value

int

Methods

ComputeDynamics(double)

Method to computeForce and torque on the body

public override void ComputeDynamics(double time)

Parameters

time double

[s] The integrator time

CreateMagneticTorqueBar(double, Vector3)

Adds a new magnetic torque rod to the array. This will also ensure that the data is initialised.

public MagneticTorqueBar CreateMagneticTorqueBar(double maxMTBDipoles, Vector3 gtMatrix_B)

Parameters

maxMTBDipoles double

Maximum dipole of MTB

gtMatrix_B Vector3

Steering Matrix

Returns

MagneticTorqueBar

LinkStateProperties(StateModel)

Links and registers any of the states from the state model that is associated with the root object.

public override void LinkStateProperties(StateModel properties)

Parameters

properties StateModel

The model that contains the list of states to fetch

OnChildAttached(UniverseObject)

This event is called when a child has been attached to this object. This will pass in the reference to the child object that was added.

protected override void OnChildAttached(UniverseObject child)

Parameters

child UniverseObject

The child object that was added

OnChildDetached(UniverseObject)

This event is called when a child has been detached from this object. This will pass in the child object that was removed.

protected override void OnChildDetached(UniverseObject child)

Parameters

child UniverseObject

The child object that was detached

OnCreate()

Called when the 'Component' is created from the controller.

protected override void OnCreate()

OnLoad(double)

Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.

protected override void OnLoad(double time)

Parameters

time double

[s] The current clock time of the simulation