Module: planetEphemeris

Executive Summary

The planetEphemeris module uses classical heliocentric orbit elements to specify a planet’s position and velocity vectors.

Optionally, the planet’s orientation can also be specified through a right ascension angle, a declination angle, and a location sidereal time at epoch. The planet rotation about its third (polar) axis can be specified as well. If the planet attitude information is not complete or missing then an inertially fixed zero planet orientation is modeled. The module is able to receive a stack or vector of classical orbit elements and orientation information to output a series of planet ephemeris messages. 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.

../../../../_images/planetEphemerisIO.svg

Figure 1: planetEphemeris() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

planetOutMsgs

SpicePlanetStateMsgPayload

vector of planet spice state output messages


class PlanetEphemeris : public SysModel
#include <planetEphemeris.h>

planet ephemeris class

Public Functions

PlanetEphemeris()

This constructor initializes the variables.

~PlanetEphemeris()

Module deconstructor

void Reset(uint64_t CurrentSimNanos)
void UpdateState(uint64_t CurrentSimNanos)

This update routine loops over all the planets and creates their heliocentric position and velocity vectors at the current time. If the planet orientation information is provided, then this is computed as well. The default orientation information is a zero orientation.

Parameters:

CurrentSimNanos – The current clock time for the simulation

Returns:

void

void setPlanetNames(std::vector<std::string> planetNames)

add list of planet names

Public Members

std::vector<Message<SpicePlanetStateMsgPayload>*> planetOutMsgs

&#8212; vector of planet state output messages

std::vector<ClassicElements> planetElements

&#8212; Vector of planet classical orbit elements

std::vector<double> rightAscension

[r] right ascension of the north pole rotation axis (pos. 3-axis)

std::vector<double> declination

[r] Declination of the north pole rotation axis (neg. 2-axis)

std::vector<double> lst0

[r] initial planet local sidereal time angle (pos. 3-axis)

std::vector<double> rotRate

[r/s] planet rotation rate

BSKLogger bskLogger

&#8212; BSK Logging

Private Members

std::vector<std::string> planetNames

&#8212; Vector of planet names

double epochTime

[s] time of provided planet ephemeris epoch

int computeAttitudeFlag

&#8212; flag indicating if the planet orienation information is provided