Table of Contents

Class Gimbal

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] The Gimbal class provides a single 1-axial gimbal that allows for a component attached to be rotated about a fixed axis. The gimbal will rotate about its local Up-vector, which is a yaw rotation. The gimbal does not move horizontally and does not perform any physical calculations. This means that it will not contribute to the changes in the mass properties of the spacecraft or any torques applied to the spacecraft’s overall orientation. Objects attached to the gimbal will be rotated at the pivot point (the local origin) and gimbals can be stacked for multidimensional rotations. Physics-based estimates, such as forces and moment of inertia calculations are not calculated. As such, the gimbal should be used as a proof of concept design before moving to a more advanced and accurate system, such as the Hinged Rigid Body (HRB) component.


public class Gimbal : PhysicalObject
Inheritance
Gimbal

Constructors

Gimbal()

Default constructor

protected Gimbal()

Fields

DesiredVelocity

The desired angular velocity of the motor that should spin the gimbal. This velocity will only be met provided the torque does not exceed the limit.

[Unit(UnitType.RADIAN_PER_SECOND)]
[ReadOnly]
[Metadata(IsAdvanced = true)]
public double DesiredVelocity

Field Value

double

In_CommandGimbalMsg

An optional gimbal command message that will update the target angle and desired velocity based on the message, which can be calculated from a software module or external source.

public CommandGimbalMessage? In_CommandGimbalMsg

Field Value

CommandGimbalMessage

InertiaValue

[kg m^2] The overridden inertia value of the gimbal. If this is left as zero, then the inertia will be calculated based on the default values.

[Hidden]
public double InertiaValue

Field Value

double

MaxAngle

The maximum angle at which the gimbal can reach. If the gimbal attempts to reach an angle passed this point, the gimbal will be locked.

[Unit(UnitType.DEGREE)]
[Range(0, 360)]
public double MaxAngle

Field Value

double

MaxTorque

The maximum torque that can be applied to the gimbal motor when attempting to change the angle of the gimbal. This is a value that does not change and the gimbal will only rotate with the amount of torque.

[Unit(UnitType.NEWTON_METRE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(IsAdvanced = true)]
public double MaxTorque

Field Value

double

MinAngle

The minimum angle at which the gimbal can reach. If the gimbal attempts to reach an angle below this point, the gimbal will be locked.

[Unit(UnitType.DEGREE)]
[Range(0, 360)]
public double MinAngle

Field Value

double

Out_GimbalStatusMsg

The gimbal message that includes the information about the current gimbal position and the torque of the gimbal.

public GimbalStatusMessage? Out_GimbalStatusMsg

Field Value

GimbalStatusMessage

OverrideInertia

A flag whether to override the default rotational inertia value for determining the torques of the gimbal.

[Metadata(IsAdvanced = true)]
public bool OverrideInertia

Field Value

bool

StepAngle

The minimum step angle between each of the steps on the gimbal that it can rotate between.

[Unit(UnitType.DEGREE)]
[Range(0, 360)]
[Metadata(IsAdvanced = true)]
public double StepAngle

Field Value

double

TargetAngle

The target angle that should be rotated towards. If the target angle changes, the gimbal will attempt to rotate towards the targeted angle.

[Unit(UnitType.DEGREE)]
[Range(0, 360)]
public double TargetAngle

Field Value

double

Properties

Angle

The angle at which the gimbal is currently rotated. This is set by the gimbal and cannot be set by external classes.

[Unit(UnitType.DEGREE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_GimbalStatusMsg")]
public double Angle { get; }

Property Value

double

Inertia

The rotational inertia of the gimbal and all objects attached. By default, if the inertia value is left to be zero, then the rotational inertia of the gimbal is calculated by using a Cylinder model of I = 0.5 m r^2, where m is the total mass and r is the distance the furthest child is from the cylinder.

[Unit(UnitType.KILOGRAM_SQUARE_METRE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(IsAdvanced = true)]
public double Inertia { get; set; }

Property Value

double

IsLimited

A flag whether the gimbal has reached its limits of the angle at which it is able to rotate. This does not necessarily mean it is stuck, but that one direction is restricted.

[ReadOnly]
[Metadata(IsAdvanced = true, ContainedIn = "Out_GimbalStatusMsg")]
public bool IsLimited { get; }

Property Value

bool

IsLocked

A flag whether the gimbal is able to move. If the gimbal is locked, the gimbal angle will not be changed.

[Metadata(ContainedIn = "Out_GimbalStatusMsg")]
public bool IsLocked { get; set; }

Property Value

bool

Torque

The current torque of the gimbal motor when attempting to change the angle of the gimbal.

[Unit(UnitType.NEWTON_METRE)]
[ReadOnly]
[Metadata(ContainedIn = "Out_GimbalStatusMsg")]
public double Torque { get; }

Property Value

double

Velocity

The current angular velocity of the gimbal while it is moving. If the gimbal is not moving, then the velocity will not change over time.

[Unit(UnitType.RADIAN_PER_SECOND)]
[ReadOnly]
[Metadata(ContainedIn = "Out_GimbalStatusMsg")]
public double Velocity { get; }

Property Value

double

Methods

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