WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
warpos::EkfDynamics< N, O, D > Class Template Reference

#include <EkfDynamics.hpp>

Inheritance diagram for warpos::EkfDynamics< N, O, D >:

Public Member Functions

virtual int16 calculateDynamics (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, N > &tar_state_dot)
 Function to calculate a state time derivative from current state of system.
virtual int16 calculateDynamicsJacobian (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, N *N > &dynamics_Jacobian)
 Function to calculate the dynamics function Jacobian from current state of system.
virtual int16 calculateDynamicsNoiseMappingMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, N *D > &dynamics_mapping)
 Function to calculate the matrix that maps the noise configuration space to the state configuration space.
virtual int16 calculateNoiseCovariance (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, D *D > &process_covariance)
 Function to calculate the covariance matrix of a given process with a specific noise profile.
virtual int16 calculateObserverDynamics (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, O > &obs_state_dot)
 Function to calculate the observer state vector time vector.
int16 calculateRates (floating_point time, const std::array< floating_point, N+N *N+O > &state, std::array< floating_point, N+N *N+O > &out_rates) override
 Function to calculate rates from current state of system.
Public Member Functions inherited from warpos::Rates< N+N *N+O >
virtual int16 calculateRates (floating_point time, const std::array< floating_point, N > &state, std::array< floating_point, N > &out_rates)
 Function to calculate rates from current state of system.

Detailed Description

template<uint32 N, uint32 O, uint32 D>
class warpos::EkfDynamics< N, O, D >

The dynamics class defines a generic, templated base class which may be used generically as a time update in the EKF time update class. The values N, O, and D should be assigned and are defined as follows: N - The number of states in the target state vector. i.e. 3 for [x, y, z] O - The number of observer states. May be unused but could be i.e. another [x, y, z] for range D - The number of noise states. Typically the same as N but could be i.e. state is [range, rangerate] but noise is modeled as [x, y, z] variances

This class should be inherited from for each state dynamics used on a system

Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech

Member Function Documentation

◆ calculateDynamics()

template<uint32 N, uint32 O, uint32 D>
virtual int16 warpos::EkfDynamics< N, O, D >::calculateDynamics ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
std::array< floating_point, N > & tar_state_dot )
inlinevirtual

Function to calculate a state time derivative from current state of system.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]tar_state_dotImplicit return of state time derivative based on time and state
Returns
Error return code, zero means no error
Note
Not implementing this will make the assumption that the state is stationary

◆ calculateDynamicsJacobian()

template<uint32 N, uint32 O, uint32 D>
virtual int16 warpos::EkfDynamics< N, O, D >::calculateDynamicsJacobian ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
std::array< floating_point, N *N > & dynamics_Jacobian )
inlinevirtual

Function to calculate the dynamics function Jacobian from current state of system.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]dynamics_JacobianImplicit return of the dynamics Jacobian w.r.t. the state vector, NOTE: the matrix is vectorized
Returns
Error return code, zero means no error
Note
Not implementing this will make the assumption that the dynamics are independent of the state

◆ calculateDynamicsNoiseMappingMatrix()

template<uint32 N, uint32 O, uint32 D>
virtual int16 warpos::EkfDynamics< N, O, D >::calculateDynamicsNoiseMappingMatrix ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
std::array< floating_point, N *D > & dynamics_mapping )
inlinevirtual

Function to calculate the matrix that maps the noise configuration space to the state configuration space.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]dynamics_mappingImplicit return of the matrix (vectorized) that maps the noise space to the state space
Returns
Error return code, zero means no error
Note
Not implementing this will make the assumption that there is no noise

◆ calculateNoiseCovariance()

template<uint32 N, uint32 O, uint32 D>
virtual int16 warpos::EkfDynamics< N, O, D >::calculateNoiseCovariance ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
std::array< floating_point, D *D > & process_covariance )
inlinevirtual

Function to calculate the covariance matrix of a given process with a specific noise profile.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]process_covarianceImplicit return of the process noise covariance (vectorized)
Returns
Error return code, zero means no error
Note
Not implementing this will make the assumption that there is no noise

◆ calculateObserverDynamics()

template<uint32 N, uint32 O, uint32 D>
virtual int16 warpos::EkfDynamics< N, O, D >::calculateObserverDynamics ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
std::array< floating_point, O > & obs_state_dot )
inlinevirtual

Function to calculate the observer state vector time vector.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]obs_state_dotImplicit return of observer time derivative based on time and state
Returns
Error return code, zero means no error
Note
Not implementing this will make the assumption that the observer is stationary

◆ calculateRates()

template<uint32 N, uint32 O, uint32 D>
int16 warpos::EkfDynamics< N, O, D >::calculateRates ( floating_point time,
const std::array< floating_point, N+N *N+O > & state,
std::array< floating_point, N+N *N+O > & out_rates )
inlineoverride

Function to calculate rates from current state of system.

Parameters
timeThe reference time
stateThe reference state ordered as state vector (N elements), state covariance (N x N elements), observer state (O elements)
out_ratesImplicit return of rates based on time, state

The documentation for this class was generated from the following file:
  • /Users/mickey/Documents/Projects/warptwin/warpos/src/gncutils/EKF/EkfDynamics.hpp