# 2.2. Torque Model Set-up¶

The setup of the rotational state is similar to the set-up of the translational acceleration framework.

The user can define the settings for the torque acting on a vehicle in the following variable: SelectedTorqueMap.

class SelectedTorqueMap

This is a typedef for:

std::map< std::string, std::map< std::string, std::vector< std::shared_ptr< torqueSettings > > > >


Just as in the translational acceleration setup, the first key is the body undergoing the torque, the second key is the body exerting the torque, and the third entry is a vector of torqueSettings. The available torque models are given in an enum called AvailableTorque. An example can be given using the Apollo capsule example:

SelectedTorqueMap selectedTorqueModelMap;
selectedTorqueModelMap[ "Apollo" ][ "Earth" ].push_back( std::make_shared< TorqueSettings >( aerodynamic_torque ) );


Currently, there are only two options for the torque settings, both which are not derived classes of the TorqueSettings class, and do not need extra information. Thus both can be defined in a similar way.

When all the settings of the torque acting on the body are defined, the TorqueModelMap can be created as follows:

TorqueModelMap torqueModelMap = createTorqueModelsMap( bodyMap, selectedTorqueModelMap )


This will create a map that can be used as an input to the RotationalStatePropagatorSettings.

## 2.2.1. Available Models¶

Currently, there are two torque models that can be used for the rotational state propagator:

aerodynamic torque

Torque exerted by a body with an atmosphere model and shape model on another body. It is important that the body exerting the torque has an atmosphere model defined, and a shape model, if this is not the case, the torque cannot be calculated. Furthermore, the body undergoing the torque needs to have aerodynamic coefficient interface defined, and needs to have its moment coefficients defined.

second-order gravitational torque

Torque exerted by a point mass on a body with a degree two spherical harmonics mass distribution. A degree two spherical harmonics mass distribution can be represented by an inertia tensor, thus for this torque model, the body undergoing the torque needs to have an inertia tensor defined. The body exerting the torque only needs to have a gravitational model defined.