Description

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 that carry over to the spacecraft. This means that it will not contribute to the changes in the overall inertia 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 component. However, gimbals can be added to Ground Stations and are not limited to spacecraft.


Example Use Cases

  • Antenna Rotation: Used to rotate the antenna between multiple rotations, able to increase the bandwidth of a particular antenna by lining up the line of sight to a location of the Earth.
  • Camera Imaging: Adding multiple gimbals, can allow for a full three-axis rotation gimbal system. If used correctly, this could allow for a camera that can independently point to any location on Earth without the requirement of rotating the spacecraft with reaction wheels.

Module Implementation

The gimbal is a simple component, aimed to rotate a component about its axis. There exists an angle , which is the angle the gimbal is currently rotated about the yaw axis (the local-up direction of the component) and a target angle . Both angles are measured in degrees for simplicity. If , then no calculations will be performed in the update step. However, if there is a difference, the gimbal will first clamp the angles to the minimum and maximum where:

To determine the torque applied to the gimbal, the moment of inertia (or rotational inertia) of the gimbal is required to be calculated. It is assumed that the gimbal is a cylinder about the up-axis with a uniform mass distribution. The rotational inertia , measured in is calculated using the standard formula for this shape:

where is the total mass of the gimbal and is the radius of the extent of the gimbal’s stack, including any sub-components. The mass is calculated by the sum of the gimbal’s mass and all components attached.

The radius of the ‘cylinder’ is calculated to be the maximum distance between the gimbal, in the inertial frame and any child component that is attached to the gimbal. This is calculated as:

where is the position of the gimbal in an isolated environment (in the inertial frame ) and is the position of the individual child components in the same frame, which is done on a recursive check. The inertia is re-calculated each time it is called, ensuring that any changes to the locations or masses of child components are updated in the estimated inertia. Although this is an estimate, if the correct rotational inertia is known, the inertia value can be overridden by another value, which will be fixed and not affected by the children added to the gimbal.

If the inertia is zero (if there are no components attached or if the total mass of the gimbal chain is zero), then the angle will be set to the target each update call, . If the inertia is non-zero, the angular velocity needs to be calculated. This is calculated based on the inertia and the desired angular velocity . Initially, . Then, the torque is calculated as:

Once the torque is calculated, if the torque is greater than the maximum torque , which is defined by the user, then . The velocity is then recalculated to be equivalent to this torque:

Then, the change in angle can be calculated as:

where is the time-step of the update, which is calculated as the difference between the current time and the previous update step’s time. If , then, since all of these calculations assume a positive change, , and . The angle is then updated as:

where is the current from the previous step’s calculation. Finally, once the angle is calculated, a rotation is applied to the gimbal’s local transform such that it will perform a yaw operation about the local-up axis by the angle . However, this will only be performed if , where is the step-angle defined. This will result in a ‘jittering’ behavior if the step-angle is significant. This is added to simulate the effect of the quantization of angles. The angle will be consistent as if , provided it is far enough from the bounds or target angle (), however, the rotation of the component will only be updated if the condition is met.

If the angle is within the step angle from one of the two bounds, a flag marking it is at a limit called IsLimited will be set. This indicates it cannot move in one particular direction (at least). Additionally, the gimbal can be locked. If the gimbal is locked, the gimbal is unable to rotate at all. This is a flag that can be enabled or disabled at runtime. The final angle, torque and velocity are outputted to the Out_GimbalStatusMsg. If the In_GimbalRequestMsg is connected to a valid message, the target angle will be read from before performing any of the additional calculations.


Assumptions/Limitations

  • Rotational Inertia: Unless overridden, it is assumed that the gimbal’s mass distribution is uniform about a cylinder with a particular radius and a mass , following the standard equation .
  • Attitude Torques: The torques generated through rotations of the gimbal and sub-components will not affect the attitude dynamics of the spacecraft. The gimbal will also not produce rates of change on the mass properties. For large masses, there may be a small numerical error while the gimbal is moving due to this issue.