Ginan
|
Functions | |
ParallelArchitecture | Kalman_Filter__ () |
Kalman Filter. | |
void | outputResiduals (Trace &trace, KFMeas &kfMeas, int iteration, string suffix, int begH, int numH) |
MatrixXi | correlationMatrix (MatrixXd &P) |
InitialState | initialStateFromConfig (const KalmanModel &kalmanModel, int index) |
KFState | mergeFilters (const vector< KFState * > &kfStatePointerList, const vector< KF > &stateList) |
bool | isPositiveSemiDefinite (MatrixXd &mat) |
MatrixXi correlationMatrix | ( | MatrixXd & | P | ) |
InitialState initialStateFromConfig | ( | const KalmanModel & | kalmanModel, |
int | index ) |
bool isPositiveSemiDefinite | ( | MatrixXd & | mat | ) |
ParallelArchitecture Kalman_Filter__ | ( | ) |
Kalman Filter.
This software uses specialised kalman filter classes to perform filtering. Using classes such as KFState, KFMeas, etc, prevents duplication of code, and ensures that many edge cases are taken care of without the need for the developer to consider them explicitly.
The basic workflow for using the filter is: create filter object, create a list of measurements (only adding entries for required states, using KFKeys to reference the state element) combine measurements that in a list into a single matrix corresponding to the new state, and filtering - filtering internally saves the states for RTS code, using a single sequential file that has some headers added so that it can be traversed backwards
The filter has some pre/post fit checks that remove measurements that are out of expected ranges, and there are functions provided for setting, resetting, and getting values, noises, and covariance values.
KFKey objects are used to identify states. They may have a KF type, SatSys value, string (usually used for receiver id), and number associated with them, and can be set and read from filter objects as required.
KFMeasEntry objects are used for an individual measurement, before being combined into KFMeas objects that contain all of the measurements for a filter iteration.
Internally, the data is stored in maps and Eigen matrices/vectors, but the accessors should be used rather than the vectors themselves to ensure that states have been initialised and are in the expected order.
InitialState objects are created directly from yaml configurations, and contain the detailis about state transitions, including process noise, which are automatically added to the filter when a stateTransition() call is used, scaling any process noise according to the time gap since the last stateTransition.
$$ K = HPH^\intercal + R $$ fgdfg
KFState mergeFilters | ( | const vector< KFState * > & | kfStatePointerList, |
const vector< KF > & | stateList ) |
void outputResiduals | ( | Trace & | trace, |
KFMeas & | kfMeas, | ||
int | iteration, | ||
string | suffix, | ||
int | begH, | ||
int | numH ) |
trace | Trace file to output to |
kfMeas | Measurements, noise, and design matrix |
iteration | Number of iterations prior to this check |
suffix | Suffix to use in header |
begH | Index of first measurement to process |
numH | Number of measurements to process |