Table of Contents

Class HingedRigidBody

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] This component 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

ATheta

[-] Term needed for back substitution

[Hidden]
public Vector3 ATheta

Field Value

Vector3

BTheta

[-] Term needed for back substitution

[Hidden]
public Vector3 BTheta

Field Value

Vector3

C

Rotational damping coefficient of hinge.

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

Field Value

double

CTheta

[-] Term needed for back substitution

[Hidden]
public double CTheta

Field Value

double

ISPrimePntL_B

[kg-m^2/s] Time body derivative IPntS in body frame components

[Hidden]
public Matrix3 ISPrimePntL_B

Field Value

Matrix3

In_HRBAngleMsg

Rigid body reference input message, used to set the reference angle and rate

public HRBAngleMessage? In_HRBAngleMsg

Field Value

HRBAngleMessage

In_MotorTorqueArrayMsg

Motor torque input message for controlling the torques of the hinge

public MotorTorqueArrayMessage? In_MotorTorqueArrayMsg

Field Value

MotorTorqueArrayMessage

K

Torsional spring constant of hinge.

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

Field Value

double

Length

Distance from hinge point H to hinged rigid body center of mass S. Also known as 'D'.

[Unit(UnitType.METRE)]
public double Length

Field Value

double

Lock

A flag that will lock the HRB from moving

[Unit(UnitType.NONE)]
public bool Lock

Field Value

bool

MotorTorque

[N-m] Optional motor torque. Also known as 'U'.

[Hidden]
public double MotorTorque

Field Value

double

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

PreviousTheta

[rad] Stores the previous theta

[Hidden]
public double PreviousTheta

Field Value

double

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

Hinged rigid body angle

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

Property Value

double

ThetaDot

Hinged rigid body angle rate

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

Property Value

double

ThetaDotTarget

Hinged rigid body reference angle rate

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

Property Value

double

ThetaTarget

Hinged rigid body reference angle. Also known as 'ThetaRef'.

[Unit(UnitType.RADIAN)]
[Range(-3.141592653589793, 3.141592653589793)]
public double ThetaTarget { get; set; }

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

The current attitude rate

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()

OnFinish(double)

Called when the object is deleted from the simulation and can handle any cleanup of variables.

protected override void OnFinish(double time)

Parameters

time double

[s] The current clock time when deleted

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

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

Substitutes in the Back Substitution Matrices and performs some calculations.

[Hidden]
public override void UpdateBackContributions(double time, ref BackSubstitutionMatrices backSubMatrices, Vector3 sigma_BN, Vector3 omega_BN_B, Vector3 g_N)

Parameters

time double

The current time [s]

backSubMatrices BackSubstitutionMatrices

A reference to the Matrices

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

[Hidden]
public override void UpdateEnergyContributions(double time, ref Vector3 angMomentum_B, ref double energy, Vector3 omega_BN_B)

Parameters

time double

The current time [s]

angMomentum_B Vector3

A reference to the Angular Momentum Vector

energy double

A reference to the Energy Contribution value

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