Module: simpleVoltEstimator

Executive Summary

The Simple Voltage Estimator module is used to provide error-ed truth (or truth) spacecraft electric potentials, similar to the Module: simpleNav module that provides error-ed truth (or truth) spacecraft states. This class is used to perturb the truth state away using a gauss-markov error model. It is designed to look like a random walk process put on top of the nominal spacecraft voltage. This is meant to be used in place of the nominal voltage output.

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

voltOutMsg

VoltMsgPayload

spacecraft voltage output msg

voltInMsg

VoltMsgPayload

spacecraft voltage input msg

User Guide

This module is set up similarly to the Module: simpleNav module. It is constructed using sVoltObject = simpleVoltEstimator.SimpleVoltEstimator(). The random walk bound is specified using sVoltObject.walkBounds and the standard deviation is specified using sVoltObject.PMatrix. Note that the input for the walk bound and standard deviation must be a list to work for the gauss_markov module.

If no walk bound or standard deviation is specified, then the voltage measurement will not be corrupted with noise.


class SimpleVoltEstimator : public SysModel
#include <simpleVoltEstimator.h>

simple voltage estimation module class

Public Functions

SimpleVoltEstimator()

This is the constructor for the simple voltage estimator module. It sets default variable values and initializes the various parts of the model

~SimpleVoltEstimator()

Destructor. Nothing here.

void Reset(uint64_t CurrentSimNanos)

This method is used to reset the module. It initializes the various containers used in the model as well as creates the output message. The error states are allocated as follows: Total states: 1

  • Voltage error [0]

Returns:

void

void UpdateState(uint64_t CurrentSimNanos)

This method calls all of the run-time operations for the simpleVoltEstimator module.

Parameters:

CurrentSimNanos – The clock time associated with the model call

Returns:

void

void computeErrors()

This method sets the propagation matrix and requests new random errors from its GaussMarkov model.

Returns:

void

void applyErrors()
void readInputMessages()

This method reads the input message associated with the spacecraft voltage

void writeOutputMessages(uint64_t Clock)

This method writes the voltage information into the output state message.

Parameters:

Clock – The clock time associated with the model call

Returns:

void

Public Members

Eigen::MatrixXd PMatrix

&#8212; Cholesky-decomposition or matrix square root of the covariance matrix to apply errors with

Eigen::VectorXd walkBounds

&#8212; “3-sigma” errors to permit for states

Eigen::VectorXd voltErrors

&#8212; Current voltage errors applied to truth

Message<VoltMsgPayload> voltOutMsg

voltage output msg

VoltMsgPayload trueVoltState

&#8212; voltage state without errors

VoltMsgPayload estVoltState

&#8212; voltage state including errors

BSKLogger bskLogger

&#8212; BSK Logging

ReadFunctor<VoltMsgPayload> voltInMsg

voltage input msg

Private Members

Eigen::MatrixXd AMatrix

&#8212; The matrix used to propagate the state

GaussMarkov errorModel

&#8212; Gauss-markov error states