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)
~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.

Return

void

void setRNGSeed(uint64_t newSeed)

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

Return

void

Parameters
  • newSeed: The seed to use in the random number generator

Eigen::VectorXd getCurrentState()

Method returns the current random walk state from model.

Return

The private currentState which is the vector of random walk values

void setUpperBounds(Eigen::VectorXd newBounds)

Set the upper bounds on the random walk to newBounds.

Return

void

Parameters
  • newBounds: the bounds to put on the random walk states

void setNoiseMatrix(Eigen::MatrixXd noise)

Set the noiseMatrix that is used to define error sigmas.

Return

void

Parameters
  • noise: The new value to use for the noiseMatrix variable (error sigmas)

void setPropMatrix(Eigen::MatrixXd prop)

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

Return

void

Parameters
  • prop: The new value for the state propagation matrix

Public Members

Eigen::VectorXd stateBounds

Upper bounds to use for markov

Eigen::VectorXd currentState

State of the markov model

Eigen::MatrixXd propMatrix

Matrix to propagate error state with

Eigen::MatrixXd noiseMatrix

covariance matrix to apply errors with

BSKLogger bskLogger

BSK Logging

Private Members

uint64_t RNGSeed

Seed for random number generator

std::minstd_rand rGen

Random number generator for model

std::normal_distribution<double> rNum

Random number distribution for model

uint64_t numStates

Number of states to generate noise for