Module: ephemDifference

Executive Summary

This module reads in the position and velocity of multiple orbital bodies and outputs position and velocity of each body relative to a single other orbital body position and velocity. Up to 10 input ephemeris messages can be connected.

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.

../../../../_images/moduleImgEphemDifference.svg

Figure 1: ephemDifference() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

ephBaseInMsg

EphemerisMsgPayload

base ephemeris input message name

ephInMsg

EphemerisMsgPayload

ephemeris input message to be converted, stored in changeBodies[i]

ephOutMsg

EphemerisMsgPayload

converted ephemeris output message, stored in changeBodies[i]


Defines

MAX_NUM_CHANGE_BODIES

Functions

void SelfInit_ephemDifference(EphemDifferenceData *configData, int64_t moduleID)

This method creates the output ephemeris messages for each body.

Parameters
  • configData – The configuration data associated with the ephemeris model

  • moduleID – The module identification integer

Returns

void

void Update_ephemDifference(EphemDifferenceData *configData, uint64_t callTime, int64_t moduleID)

This method recomputes the body postions and velocities relative to the base body ephemeris and writes out updated ephemeris position and velocity for each body.

Parameters
  • configData – The configuration data associated with the ephemeris model

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

  • moduleID – The module identification integer

Returns

void

void Reset_ephemDifference(EphemDifferenceData *configData, uint64_t callTime, int64_t moduleID)

This method resets the module.

Parameters
  • configData – The configuration data associated with the ephemeris model

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

  • moduleID – The module identification integer

Returns

void

struct EphemChangeConfig
#include <ephemDifference.h>

Container with paired input/output message names and IDs.

Public Members

EphemerisMsg_C ephInMsg

[-] Input name for the ephemeris message

EphemerisMsg_C ephOutMsg

[-] The name converted output message

struct EphemDifferenceData
#include <ephemDifference.h>

Container holding ephemDifference module variables.

Public Members

EphemerisMsg_C ephBaseInMsg

base ephemeris input message name

EphemChangeConfig changeBodies[MAX_NUM_CHANGE_BODIES]

[-] The list of bodies to change out

uint32_t ephBdyCount

[-] The number of ephemeris bodies we are changing

BSKLogger *bskLogger

BSK Logging.