Module: boreAngCalc

Executive Summary

A class to perform a range of boresight related calculations. 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 variable name 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

scStateInMsg

SCStatesMsgPayload

spacecraft state input message

celBodyInMsg

SpicePlanetStateMsgPayload

celestial body state msg at which we pointing at

angOutMsg

BoreAngleMsgPayload

bore sight output message


class BoreAngCalc : public SysModel
#include <boreAngCalc.h>

A class to perform a range of boresight related calculations.

Public Functions

BoreAngCalc()

The constructor. Note that you have to overwrite the message names.

~BoreAngCalc()

The destructor. So tired of typing this.

void Reset(uint64_t CurrentSimNanos)

This method is used to reset the module.

Returns

void

void UpdateState(uint64_t CurrentSimNanos)

This method is the main carrier for the boresight calculation routine. If it detects that it needs to re-init (direction change maybe) it will re-init itself. Then it will compute the angles away that the boresight is from the celestial target.

Parameters

CurrentSimNanos – The current simulation time for system

Returns

void

void computeAxisPoint()

This method computes the vector specified in the input file in the LVLH reference frame of the spacecraft above the target celestial body. This is used later to compute how far off that vector is in an angular sense.

Returns

void

void computeOutputData()

This method computes the output structure for messaging. The miss angle is absolute distance between the desired body point and the specified structural vector. The aximuth angle is the angle between the y pointing axis and the desired pointing vector projected into the y/z plane.

Returns

void

void WriteOutputMessages(uint64_t CurrentClock)

This method writes the output data out into the messaging system.

Parameters

CurrentClock – The current time in the system for output stamping

Returns

void

void ReadInputs()

This method reads the input messages in from the system and sets the appropriate parameters

Returns

void

Public Members

ReadFunctor<SCStatesMsgPayload> scStateInMsg

(-) spacecraft state input message

ReadFunctor<SpicePlanetStateMsgPayload> celBodyInMsg

(-) celestial body state msg at which we pointing at

Message<BoreAngleMsgPayload> angOutMsg

(-) bore sight output message

double boreVec_B[3]

(-) boresight vector in structure

double boreVecPoint[3]

(-) pointing vector in the target relative point frame

BoreAngleMsgPayload boresightAng

(-) Boresight angles relative to target

bool inputsGood

(-) Flag indicating that inputs were read correctly

BSKLogger bskLogger

&#8212; BSK Logging

Private Members

SpicePlanetStateMsgPayload localPlanet

(-) planet that we are pointing at

SCStatesMsgPayload localState

(-) observed state of the spacecraft