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
BTheta
[-] Term needed for back substitution
[Hidden]
public Vector3 BTheta
Field Value
C
Rotational damping coefficient of hinge.
[Unit("Nms/rad")]
public double C
Field Value
CTheta
[-] Term needed for back substitution
[Hidden]
public double CTheta
Field Value
ISPrimePntL_B
[kg-m^2/s] Time body derivative IPntS in body frame components
[Hidden]
public Matrix3 ISPrimePntL_B
Field Value
In_HRBAngleMsg
Rigid body reference input message, used to set the reference angle and rate
public HRBAngleMessage? In_HRBAngleMsg
Field Value
In_MotorTorqueArrayMsg
Motor torque input message for controlling the torques of the hinge
public MotorTorqueArrayMessage? In_MotorTorqueArrayMsg
Field Value
K
Torsional spring constant of hinge.
[Unit("Nm/rad")]
public double K
Field Value
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
Lock
A flag that will lock the HRB from moving
[Unit(UnitType.NONE)]
public bool Lock
Field Value
MotorTorque
[N-m] Optional motor torque. Also known as 'U'.
[Hidden]
public double MotorTorque
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
PreviousTheta
[rad] Stores the previous theta
[Hidden]
public double PreviousTheta
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
Hinged rigid body angle
[Unit(UnitType.RADIAN)]
[ReadOnly]
public double Theta { get; set; }
Property Value
ThetaDot
Hinged rigid body angle rate
[Unit(UnitType.RADIAN_PER_SECOND)]
[ReadOnly]
public double ThetaDot { get; set; }
Property Value
ThetaDotTarget
Hinged rigid body reference angle rate
[Unit(UnitType.RADIAN_PER_SECOND)]
public double ThetaDotTarget { get; set; }
Property Value
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
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()
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
doubleThe current time [s]
backSubMatrices
BackSubstitutionMatricesA reference to the Matrices
sigma_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
[Hidden]
public override void UpdateEnergyContributions(double time, ref Vector3 angMomentum_B, ref double energy, Vector3 omega_BN_B)
Parameters
time
doubleThe current time [s]
angMomentum_B
Vector3A reference to the Angular Momentum Vector
energy
doubleA reference to the Energy Contribution value
omega_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)