Table of Contents

Class Spacecraft

Namespace
NominalSystems.Universe
Assembly
NominalSystems.Universe.dll

The full spacecraft class. This allows for the spacecraft to attach components and to be able to compute the total properties of the object. Previously known as SpacecraftPlus

public class Spacecraft : DynamicBody, IIntegrable
Inheritance
Spacecraft
Implements
Inherited Members

Constructors

Spacecraft()

Default constructor to execute

public Spacecraft()

Fields

OnPreSpacecraftUpdate

TEMP Calls before physics is updated on the entity

public Action<double, double> OnPreSpacecraftUpdate

Field Value

Action<double, double>

Out_VehicleConfigMsg

Stores the vehicle configuration software message

public VehicleConfigMessage Out_VehicleConfigMsg

Field Value

VehicleConfigMessage

Methods

AttachDynamicEffector(DynamicEffector)

Attaches a new dynamic effector to the kinematic body

public bool AttachDynamicEffector(DynamicEffector effector)

Parameters

effector DynamicEffector

The new dynamic effector reference

Returns

bool

A success flag

AttachStateEffector(StateEffector)

Attaches a new state effector to the kinematic body

public bool AttachStateEffector(StateEffector effector)

Parameters

effector StateEffector

The new state effector reference

Returns

bool

A success flag

ComputeEffectorEnergy(double, ref Vector3)

Computes the energy and momentum from the effectors.

protected override void ComputeEffectorEnergy(double time, ref Vector3 totRotAngMomPntC_B)

Parameters

time double

The current time [s]

totRotAngMomPntC_B Vector3

The current angular momentum data

InitialiseEffectors()

Initialises the State and Dynamic effectors.

protected override void InitialiseEffectors()

LinkEffectors()

Links data to all of the effectors This is handled in the kinematic body class.

protected override void LinkEffectors()

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

current time (seconds)

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

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)

UpdateEffectorEquations(double)

Updates the Effector Equations of state

protected override void UpdateEffectorEquations(double time)

Parameters

time double

The current time [s]

UpdateEquationsOfMotion(double, double)

Updates all of the State Equations with their correct derivatives

public override void UpdateEquationsOfMotion(double time, double step)

Parameters

time double

The current time [s]

step double

The current delta time [s]

UpdateStates(double, double)

Integrates the state data over some time

protected override void UpdateStates(double time, double step)

Parameters

time double

The current time [s]

step double

The delta time [s]