Module: inertial3DSpin

Executive Summary

Module to compute the Inertial-3D spinning pointing navigation solution. This spin can be relative to an inertial frame or relative to an input reference frame message.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages

Msg Variable Name

Msg Type

Description

attRefOutMsg

AttRefMsgPayload

attitude reference output message

attRefInMsg

AttRefMsgPayload

(optional) attitude reference input message, if not connected then a zeroed input reference state is set

Module Description

This module generates an attitude reference frame state output message where the reference frame is rotating at a constant angular velocity vector relative to the input frame \(R_0\). If the input attitude frame message is not connected, then a zero’d input message is assumed.

The input reference frame \(R_0\) (user defined input message or default zero’d message) contains the state information in the form \(\pmb\sigma_{R_0/N}\), \(\pmb\omega_{R_0/N}\) and \(\dot{\pmb\omega}_{R_0/N}\). The constant spin vector is constant with respect to \(R_0\) and given by \({}^{R_0}{\pmb\omega}_{R/R0}\).

The angular velocity of the of the output reference frame \(R\) is then given by

\[\pmb \omega_{R/N} = \pmb\omega_{R/R_0} + \pmb\omega_{R_0/N}\]

As the spin vector \({}^{R_0}{\pmb\omega}_{R/R0}\) is constant with respect to \(R_0\), then the output frame angular acceleration is

\[\dot{\pmb\omega}_{R/N} = {\pmb\omega}_{R_0/N} \times {\pmb\omega}_{R/R0} + \dot{\pmb\omega}_{R_0/N}\]

Finally, the output frame MRP orientation is computed using

\[\dot{\pmb\sigma}_{R/N} = \frac{1}{4} [B(\pmb\sigma_{R/N})]\ {}^{R}{\pmb\omega}_{R/N}\]

where

\[[B(\pmb\sigma_{R/N})] = (1-\sigma_{R/N}^{2}) [I_{3\times 3}] + 2 [\tilde{\pmb\sigma}_{R/N}] + 2 \pmb\sigma_{R/N} \pmb\sigma_{R/N}^{T}\]

with \(\sigma_{R/N} = |\pmb\sigma_{R/N}|\).

User Guide

The only parameter that must be set is omega_RR0_R0 representing the \(R_0\)-constant spin axis \({}^{R_0}{\pmb\omega}_{R/R0}\).


Functions

void SelfInit_inertial3DSpin(inertial3DSpinConfig *configData, int64_t moduleID)

This method initializes the configData for this module. It checks to ensure that the inputs are sane and then creates the output message

Parameters:
  • configData – The configuration data associated with this module

  • moduleID – The ID associated with the configData

Returns:

void

void Update_inertial3DSpin(inertial3DSpinConfig *configData, uint64_t callTime, int64_t moduleID)

This method performs all the main computations of the module

Parameters:
  • configData – The configuration data associated with the MRP Steering attitude control

  • callTime – The clock time at which the function was called (nanoseconds)

  • moduleID – The ID associated with the configData

Returns:

void

void Reset_inertial3DSpin(inertial3DSpinConfig *configData, uint64_t callTime, int64_t moduleID)

This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values.

Parameters:
  • configData – The configuration data associated with the MRP steering control

  • callTime – The clock time at which the function was called (nanoseconds)

  • moduleID – The ID associated with the configData

Returns:

void

void computeReference_inertial3DSpin(inertial3DSpinConfig *configData, double omega_R0N_N[3], double domega_R0N_N[3], double omega_RR0_R[3], double dt)
struct inertial3DSpinConfig
#include <inertial3DSpin.h>

module configuration structure definition.

Public Members

double sigma_RN[3]

MPR of reference frame relative to inertial N frame

double omega_RR0_R0[3]

[r/s] constant angular velocity spin vector of the spinning R frame relative to the input frame R0

uint64_t priorTime

[ns] last time the guidance module is called

AttRefMsg_C attRefOutMsg

reference attitude output message

AttRefMsg_C attRefInMsg

(optional) reference attitude input message

AttRefMsgPayload attRefOutBuffer

[-] structure for the output data

BSKLogger *bskLogger

BSK Logging.