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
D
[m] distance from hinge point H to hinged rigid body center of mass S
[Unit(UnitType.METRE)]
public double D
Field Value
In_HRBAngleMsg
[Optional] Rigid body reference input message name
public HRBAngleMessage? In_HRBAngleMsg
Field Value
In_MotorTorqueArrayMsg
[OPTIONAL] Motor torque input message name
public MotorTorqueArrayMessage? In_MotorTorqueArrayMsg
Field Value
K
[N-m/rad] torsional spring constant of hinge
[Unit("Nm/rad")]
public double K
Field Value
Lock
[-] A flag that will lock the HRB from moving
[Unit(UnitType.NONE)]
public bool Lock
Field Value
Out_BodyMassMsg
Mass properties of the HRB in the Body Frame (B)
public MassMessage? Out_BodyMassMsg
Field Value
Out_HRBAngleMsg
[-] Output body state message
public HRBAngleMessage? Out_HRBAngleMsg
Field Value
Out_SpacecraftStateMsg
A body states message that defines the state of the body relative to the parent spacecraft.
public SpacecraftStateMessage? Out_SpacecraftStateMsg
Field Value
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
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
Theta
[rad] hinged rigid body angle
[Unit(UnitType.RADIAN)]
[ReadOnly]
public double Theta { get; set; }
Property Value
ThetaDot
[rad/s] hinged rigid body angle rate
[Unit(UnitType.RADIAN_PER_SECOND)]
[ReadOnly]
public double ThetaDot { get; set; }
Property Value
ThetaDotRef
[rad/s] hinged rigid body reference angle rate
[Unit(UnitType.RADIAN_PER_SECOND)]
public double ThetaDotRef { get; }
Property Value
ThetaRef
[rad] hinged rigid body reference angle
[Unit(UnitType.RADIAN)]
public double ThetaRef { get; }
Property Value
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
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
doubleThe current computation time
rDDot_BN_N
Vector3The acceleration in the body frame
omegaDot_BN_B
Vector3The derivative of the attitude rate in the body frame
sigma_BN
Vector3The 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
StateModelThe 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
doubleThe current time [s]
backSubContribution
BackSubstitutionMatricessigma_BN
Vector3The current Attitude
omega_BN_B
Vector3The current Attitude rate
g_N
Vector3The 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
doubleThe current time [s]
rotAngMomPntCContr_B
Vector3rotEnergyContr
doubleomega_BN_B
Vector3The 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
doubleThe current time [s]