Table of Contents

Class HingedRigidBody

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

This components models hinged rigid body that is a physical component attached to a spacecraft body. Other physical components maybe added to this component to inherit its state properties. It may be contributed by a motor object..


public class HingedRigidBody : StateEffector
Inheritance
HingedRigidBody

Constructors

HingedRigidBody()

Default constructor

protected HingedRigidBody()

Fields

C

[N-m-s/rad] rotational damping coefficient of hinge

[Unit("Nms/rad")]
public double C

Field Value

double

D

[m] distance from hinge point H to hinged rigid body center of mass S

[Unit(UnitType.METRE)]
public double D

Field Value

double

In_HRBAngleMsg

[Optional] Rigid body reference input message name

public HRBAngleMessage? In_HRBAngleMsg

Field Value

HRBAngleMessage

In_MotorTorqueArrayMsg

[OPTIONAL] Motor torque input message name

public MotorTorqueArrayMessage? In_MotorTorqueArrayMsg

Field Value

MotorTorqueArrayMessage

K

[N-m/rad] torsional spring constant of hinge

[Unit("Nm/rad")]
public double K

Field Value

double

Lock

[-] A flag that will lock the HRB from moving

[Unit(UnitType.NONE)]
public bool Lock

Field Value

bool

Out_BodyMassMsg

Mass properties of the HRB in the Body Frame (B)

public MassMessage? Out_BodyMassMsg

Field Value

MassMessage

Out_HRBAngleMsg

[-] Output body state message

public HRBAngleMessage? Out_HRBAngleMsg

Field Value

HRBAngleMessage

Out_SpacecraftStateMsg

A body states message that defines the state of the body relative to the parent spacecraft.

public SpacecraftStateMessage? Out_SpacecraftStateMsg

Field Value

SpacecraftStateMessage

Properties

CenterOfMassPrimeB_B

[m/s] The center of mass general-derivative of the component relative to the body frame (B). This does not include any of the sub-components and exists in isolation.

public override Vector3 CenterOfMassPrimeB_B { get; protected set; }

Property Value

Vector3

MomentOfInertiaPrimeB_B

The derivative of the moment of inertia of the component, represented in the body frame (B). This is independent and exists in isolation.

public override Matrix3 MomentOfInertiaPrimeB_B { get; protected set; }

Property Value

Matrix3

Theta

[rad] hinged rigid body angle

[Unit(UnitType.RADIAN)]
[ReadOnly]
public double Theta { get; set; }

Property Value

double

ThetaDot

[rad/s] hinged rigid body angle rate

[Unit(UnitType.RADIAN_PER_SECOND)]
[ReadOnly]
public double ThetaDot { get; set; }

Property Value

double

ThetaDotRef

[rad/s] hinged rigid body reference angle rate

[Unit(UnitType.RADIAN_PER_SECOND)]
public double ThetaDotRef { get; }

Property Value

double

ThetaRef

[rad] hinged rigid body reference angle

[Unit(UnitType.RADIAN)]
public double ThetaRef { get; }

Property Value

double

Methods

CalculateForceTorqueOnBody(double, Vector3)

Calculates the Force and Torque of the object due to the State Effector

public override void CalculateForceTorqueOnBody(double time, Vector3 omega_BN_B)

Parameters

time double

The current time [s]

omega_BN_B Vector3

ComputeDerivatives(double, Vector3, Vector3, Vector3)

Computers the Derivatives of the Body along with the Kinematic Derivatives

public override void ComputeDerivatives(double time, Vector3 rDDot_BN_N, Vector3 omegaDot_BN_B, Vector3 sigma_BN)

Parameters

time double

The current computation time

rDDot_BN_N Vector3

The acceleration in the body frame

omegaDot_BN_B Vector3

The derivative of the attitude rate in the body frame

sigma_BN Vector3

The current attitude in the body frame

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

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

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)

Parameters

time double

[s] Current time of the simulation before the update

step double

[s] The time-step to update during this tick

SetCenterOfMassPrimeB_B(Vector3)

Sets the overridden value of the center of mass prime value in the B frame to a new value.

public void SetCenterOfMassPrimeB_B(Vector3 value)

Parameters

value Vector3

[m/s] Center of Mass in the B frame

SetMomentOfInertiaPrimeB_B(Matrix3)

Sets the overridden value of the moment of inertia prime value in the B frame to a new value.

public void SetMomentOfInertiaPrimeB_B(Matrix3 value)

Parameters

value Matrix3

[kg m^2/s] Moment of Inertia Prime in the B frame

UpdateBackContributions(double, ref BackSubstitutionMatrices, Vector3, Vector3, Vector3)

Substitutes in the Back Substitution Matrices and performs some calculations.

public override void UpdateBackContributions(double time, ref BackSubstitutionMatrices backSubContribution, Vector3 sigma_BN, Vector3 omega_BN_B, Vector3 g_N)

Parameters

time double

The current time [s]

backSubContribution BackSubstitutionMatrices
sigma_BN Vector3

The current Attitude

omega_BN_B Vector3

The current Attitude rate

g_N Vector3

The spacecraft local gravity vector

UpdateEnergyContributions(double, ref Vector3, ref double, Vector3)

Computes the Energy and Momentum Contributions from the Body

public override void UpdateEnergyContributions(double time, ref Vector3 rotAngMomPntCContr_B, ref double rotEnergyContr, Vector3 omega_BN_B)

Parameters

time double

The current time [s]

rotAngMomPntCContr_B Vector3
rotEnergyContr double
omega_BN_B Vector3

The current Attitude Rate of the body

UpdateMassProperties(double, double)

Updates the mass properties of the current physical object at a particular time.

public override void UpdateMassProperties(double time, double step)

Parameters

time double

[s] The current time of the simulation

step double

[s] The delta time between the updates

WriteOutputStateMessages(double)

Writes state messages after integration

public override void WriteOutputStateMessages(double time)

Parameters

time double

The current time [s]