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, IPowerAttachment
Inheritance
HingedRigidBody
Implements
Inherited Members

Constructors

HingedRigidBody()

Default constructor for setting up the wheels

public HingedRigidBody()

Fields

C

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

[EditableVariable("N.m.s/rad", false, "", "")]
public double C

Field Value

double

D

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

[EditableVariable("m", false, "", "")]
public double D

Field Value

double

In_ArrayMotorTorqueMsg

[OPTIONAL] Motor torque input message name

public ArrayMotorTorqueMessage In_ArrayMotorTorqueMsg

Field Value

ArrayMotorTorqueMessage

In_HingedRigidBodyReferenceMsg

[Optional] Rigid body reference input message name

public HingedRigidBodyMessage In_HingedRigidBodyReferenceMsg

Field Value

HingedRigidBodyMessage

K

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

[EditableVariable("N.m/rad", false, "", "")]
public double K

Field Value

double

Lock

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

[EditableVariable("-", false, "", "")]
public bool Lock

Field Value

bool

Out_BodyMassPropsMsg

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

public MassPropsMessage Out_BodyMassPropsMsg

Field Value

MassPropsMessage

Out_HingedRigidBodyMsg

[-] Output body state message

public HingedRigidBodyMessage Out_HingedRigidBodyMsg

Field Value

HingedRigidBodyMessage

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

[kg m^2/s] 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

[EditableVariable("rad", true, "", "")]
public double Theta { get; set; }

Property Value

double

ThetaDot

[rad/s] hinged rigid body angle rate

[EditableVariable("rad/s", true, "", "")]
public double ThetaDot { get; set; }

Property Value

double

ThetaDotRef

[rad/s] hinged rigid body reference angle rate

[EditableVariable("rad/s", false, "", "")]
public double ThetaDotRef { get; }

Property Value

double

ThetaRef

[rad] hinged rigid body reference angle

[EditableVariable("rad", false, "", "")]
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

LinkInStates(StateProperties)

Links any state variables

public override void LinkInStates(StateProperties properties)

Parameters

properties StateProperties

The current list of states

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

current time (seconds)

OnReset(double)

Called when the 'Component' is reset from a simulation

protected override void OnReset(double time)

Parameters

time double

reset time (seconds)

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)

RegisterStates(StateProperties)

Registers any of the states to the state parameters

public override void RegisterStates(StateProperties properties)

Parameters

properties StateProperties

The current list of states

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

SetMomentOfInertiaPrimeB_B(Vector3)

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

public void SetMomentOfInertiaPrimeB_B(Vector3 value)

Parameters

value Vector3

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

UpdateContributions(double, ref BackSubstitutionMatrices, Vector3, Vector3, Vector3)

Subsitutes in the BackSubstitutionMatrices and performs some calculations.

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

Parameters

time double

The current time [s]

backSubContribution 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

UpdateEnergyMomentumContributions(double, ref Vector3, ref double, Vector3)

Computes the Energy and Momentum Contributions from the Body

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

Parameters

time double

The current time [s]

rotAngMomPntCContr_B Vector3

A reference to the Angular Momentum Vector

rotEnergyContr 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

WriteOutputMessages(double)

Updates the payload messages with some new states

protected void WriteOutputMessages(double time)

Parameters

time double

The current time [s]

WriteOutputStateMessages(double)

Writes state messages after integration

public override void WriteOutputStateMessages(double time)

Parameters

time double

The current time [s]