Class ThrusterArray
- Namespace
- NominalSystems.Classes
- Assembly
- NominalSystems.Classes.dll
[Nominal] The thruster array is a collection of thrusters that can be used to control the spacecraft. It has a collective configuration message that is able to determine the overall thrust of the system. The Thrusters are not required to have a thruster array, but if multiple thrusters are present, it is recommended to have a thruster array to control them.
public class ThrusterArray : PhysicalObject
- Inheritance
-
ThrusterArray
Constructors
ThrusterArray()
Default constructor
protected ThrusterArray()
Fields
In_ThrusterArrayOnTimeMsg
Input message defining the array on input commands for thrusters
public ThrusterArrayOnTimeMessage? In_ThrusterArrayOnTimeMsg
Field Value
Out_ThrusterArrayConfigMsg
Array defining the configuration of thrusters attached to this array
public ThrusterArrayConfigMessage? Out_ThrusterArrayConfigMsg
Field Value
Properties
this[int]
Overrides the index operator which will attempt to get the thruster child.
public Thruster? this[int key] { get; }
Parameters
key
intThe index to get
Property Value
- Thruster
A thruster reference
NumThrusters
The number of thrusters added to the current thruster array, which is stored in the configuration message.
[Unit(UnitType.NONE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_ThrusterArrayConfigMsg")]
public int NumThrusters { get; }
Property Value
Methods
GetThruster(int)
Returns a reference to a thruster in a particular index, provided that the thruster exists.
public Thruster? GetThruster(int index)
Parameters
index
intThe index to fetch
Returns
- Thruster
A thruster, if it exists
OnBegin(double)
Called when the object is beginning ticking for the first time. This is when the simulation calls the very first tick and will run before the update call.
protected override void OnBegin(double time)
Parameters
time
double[s] Current time of the simulation before the tick
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
UniverseObjectThe 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
UniverseObjectThe 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
OnUpdate(double, double)
Called when the object should update from the simulation tick. This will take in a time and a step, where the time is the time of the clock before updating the object.
protected override void OnUpdate(double time, double step)