Table of Contents

Class Gimbal

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

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 multi-dimensional 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 : DynamicEffector, IPowerAttachment
Inheritance
Gimbal
Implements
Inherited Members

Constructors

Gimbal()

Default constructor for the Gimbal. Does not perform any calculations.

public Gimbal()

Fields

DesiredVelocity

[r/s] 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.

[EditableVariable("r/s", 0, false, "", "")]
public double DesiredVelocity

Field Value

double

In_GimbalCmdMsg

[-] 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 GimbalCmdMessage In_GimbalCmdMsg

Field Value

GimbalCmdMessage

MaxAngle

[deg] 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.

[EditableVariable("deg", 0, 360, false, "", "")]
public double MaxAngle

Field Value

double

MaxTorque

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

[EditableVariable("m^2 kg s^-2", 0, false, "", "")]
public double MaxTorque

Field Value

double

MinAngle

[deg] 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.

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

StepAngle

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

[ForceSerialize]
[EditableVariable("deg", 0, false, "", "")]
public double StepAngle

Field Value

double

TargetAngle

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

[EditableVariable("deg", false, "", "")]
public double TargetAngle

Field Value

double

Properties

Angle

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

[EditableVariable("deg", true, "", "")]
public double Angle { get; }

Property Value

double

Inertia

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

[EditableVariable("kg m^2", 0, false, "", "")]
public double Inertia { get; set; }

Property Value

double

IsLimited

[-] A flag whether the gimbal is has reached it's limits of the angle at which it is able to be rotated. This does not necessarily mean it is stuck, but that one direction is restricted.

[EditableVariable("-", true, "", "")]
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.

[EditableVariable("-", false, "", "")]
public bool IsLocked { get; set; }

Property Value

bool

Torque

[m^2 kg s^-2] The current torque of the gimbal motor when attempting to change the angle of the gimbal.

[EditableVariable("m^2 kg s^-2", true, "", "")]
public double Torque { get; }

Property Value

double

Velocity

[r/s] 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.

[EditableVariable("r/s", true, "", "")]
public double Velocity { get; }

Property Value

double

Methods

IsChildTypeSupported(Type)

Returns true if 'Component' type is a supported child

protected override bool IsChildTypeSupported(Type type)

Parameters

type Type

a 'Component' type

Returns

bool

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

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

RecalculateInertia()

Forces a recalculation of the inertia based on the current mass of the system and the radius.

public void RecalculateInertia()