gauss_markov

class GaussMarkov
#include <gauss_markov.h>

This module is used to apply a second-order bounded Gauss-Markov random walk on top of an upper level process. The intent is that the caller will perform the set methods (setUpperBounds, setNoiseMatrix, setPropMatrix) as often as they need to, call computeNextState, and then call getCurrentState cyclically.

Public Functions

GaussMarkov()

The constructor initialies the random number generator used for the walks

GaussMarkov(uint64_t size, uint64_t newSeed = 0x1badcad1)

class constructor

~GaussMarkov()

The destructor is a placeholder for one that might do something

void computeNextState()

This method performs almost all of the work for the Gauss Markov random walk. It uses the current random walk configuration, propagates the current state, and then applies appropriate errors to the states to set the current error level.

Returns:

void

inline void setRNGSeed(uint64_t newSeed)

Method does just what it says, seeds the random number generator.

Parameters:

newSeed – The seed to use in the random number generator

Returns:

void

inline Eigen::VectorXd getCurrentState()

Method returns the current random walk state from model.

Returns:

The private currentState which is the vector of random walk values

inline void setUpperBounds(Eigen::VectorXd newBounds)

Set the upper bounds on the random walk to newBounds.

Parameters:

newBounds – the bounds to put on the random walk states

Returns:

void

inline void setNoiseMatrix(Eigen::MatrixXd noise)

Set the noiseMatrix that is used to define error sigmas.

Parameters:

noise – The new value to use for the noiseMatrix variable (error sigmas)

Returns:

void

inline void setPropMatrix(Eigen::MatrixXd prop)

Set the propagation matrix that is used to propagate the state.

Parameters:

prop – The new value for the state propagation matrix

Returns:

void

Public Members

Eigen::VectorXd stateBounds

&#8212; Upper bounds to use for markov

Eigen::VectorXd currentState

&#8212; State of the markov model

Eigen::MatrixXd propMatrix

&#8212; Matrix to propagate error state with

Eigen::MatrixXd noiseMatrix

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

BSKLogger bskLogger

&#8212; BSK Logging

Private Members

uint64_t RNGSeed

&#8212; Seed for random number generator

std::minstd_rand rGen

&#8212; Random number generator for model

std::normal_distribution<double> rNum

&#8212; Random number distribution for model

uint64_t numStates

&#8212; Number of states to generate noise for