spacecraftPointing#

Executive Summary#

The primary purpose of this module is to provide an attitude reference output to make sure that a vector given in the deputy spacecraft’s body frame points to the chief spacecraft. The position of the chief- and deputy spacecraft in the inertial frame are used as inputs for this module. The module uses the positions to create a reference vector that points from the deputy to the chief. A coordinate system is built around this vector and the orientation, angular velocity, and angular acceleration of this coordinate system are calculated with respect to the inertial frame. The output consists of these three vectors and can consequently be used as an input for the attitude tracking error module.

More information can be found in the PDF Description.

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

chiefPositionInMsg

NavTransMsgPayload

primary position input message

deputyPositionInMsg

NavTransMsgPayload

secondary position input message

attReferenceOutMsg

AttRefMsgPayload

attitude reference output message

Class SpacecraftPointing#

class SpacecraftPointing : public SysModel#

Top level structure for the spacecraft pointing module.

Public Functions

void reset(uint64_t callTime) override#

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:

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

Returns:

void

void updateState(uint64_t callTime) override#

This method takes the vector that points from the deputy spacecraft to the chief spacecraft and calculates the orientation, angular velocity and angular acceleration of this vector with respect to the inertial reference frame in inertial reference frame components and passes them to the attitude tracking error module, where that attitude error can be calculated.

Parameters:

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

Returns:

void

Public Members

Message<AttRefMsgPayload> attReferenceOutMsg#

The name of the output message

ReadFunctor<NavTransMsgPayload> chiefPositionInMsg#

The name of the Input message of the chief

ReadFunctor<NavTransMsgPayload> deputyPositionInMsg#

The name of the Input message of the deputy

double alignmentVector_B[3]#

Vector within the B-frame that points to antenna

double sigma_BA[3]#

&#8212; MRP of B-frame with respect to A-frame

double old_sigma_RN[3]#

&#8212; MRP of previous timestep

double old_omega_RN_N[3]#

&#8212; Omega of previous timestep

int i#

&#8212; Flag used to set incorrect numerical answers to zero

uint64_t priorTime#

[ns] Last time the attitude control is called

BSKLogger bskLogger = {}#

BSK Logging.