Main Content

Calculate shortest quaternion rotation

**Library:**Aerospace Blockset / Spacecraft / Spacecraft Dynamics

The Attitude Profile block calculates the shortest quaternion rotation that aligns the primary alignment vector with the primary constraint vector. A quaternion is defined using the scalar-first convention. Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention.

Provide the primary constraint as either a pointing mode:

`Point at nadir`

`Point at celestial body`

`Point at LatLonAlt`

Or via a custom constraint vector. The block then aligns secondary alignment and constraint vectors as much as possible without breaking primary alignment.

The library contains three versions of the Attitude Profile block preconfigured for these common attitude control modes:

Nadir Pointing —

`Point at nadir`

Geographic Pointing —

`Point at LatLonAlt`

Sun Tracking —

`Point at celestial body`

with Sun as the celestial target

For more information on the coordinate systems the Attitude Profile block uses, see Algorithms.