celestialTwoBodyPoint#

Executive Summary#

This module point one body-fixed axis towards a primary celestial object. The secondary goal is to point a second body-fixed axis towards another celestial object.

For example, the goal is to point the sensor towards the center of a planet while doing the best to keep the solar panel normal point at the sun.The module PDF Description contains further information on this module’s function, how to run it, as well as testing.

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

transNavInMsg

NavTransMsgPayload

spacecraft translation motion input message

celBodyInMsg

EphemerisMsgPayload

primary celestial body information input message

secCelBodyInMsg

EphemerisMsgPayload

(optional) secondary celestial body information

Class CelestialTwoBodyPoint#

class CelestialTwoBodyPoint : public SysModel#

Data structure for module to compute the two-body celestial pointing navigation solution.

Public Functions

void updateState(uint64_t callTime) override#

This method takes the spacecraft and points a specified axis at a named celestial body specified in the configuration data. It generates the commanded attitude and assumes that the control errors are computed downstream.

Parameters:

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

Returns:

void

void parseInputMessages()#

This method takes the navigation translational info as well as the spice data of the primary celestial body and, if applicable, the second one, and computes the relative state vectors necessary to create the restricted 2-body pointing reference frame.

Returns:

void

void computeCelestialTwoBodyPoint(uint64_t callTime)#

This method takes the spacecraft and points a specified axis at a named celestial body specified in the configuration data. It generates the commanded attitude and assumes that the control errors are computed downstream.

Parameters:
  • this – The configuration data associated with the celestial body guidance

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

Returns:

void

Public Members

double singularityThresh#

(r) Threshold for when to fix constraint axis*/

double R_P1B_N[3]#

[m] planet 1 position vector relative to inertial frame, in N-frame components

double R_P2B_N[3]#

[m] planet 2 position vector relative to inertial frame, in N-frame components

double v_P1B_N[3]#

[m/s] planet 1 velocity vector relative to inertial frame, in N-frame components

double v_P2B_N[3]#

[m/s] planet 2 velocity vector relative to inertial frame, in N-frame components

double a_P1B_N[3]#

[m/s^2] planet 1 acceleration vector relative to inertial frame, in N-frame components

double a_P2B_N[3]#

[m/s^2] planet 2 acceleration vector relative to inertial frame, in N-frame components

Message<AttRefMsgPayload> attRefOutMsg#

The name of the output message*/.

ReadFunctor<EphemerisMsgPayload> celBodyInMsg#

The name of the celestial body message*/.

ReadFunctor<EphemerisMsgPayload> secCelBodyInMsg#

The name of the secondary body to constrain point*/.

ReadFunctor<NavTransMsgPayload> transNavInMsg#

The name of the incoming attitude command*/.

int secCelBodyIsLinked#

flag to indicate if the optional 2nd celestial body message is linked

AttRefMsgPayload attRefOut#

(-) copy of output reference frame message

BSKLogger bskLogger = {}#

BSK Logging.