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

#include <Measurements.hpp>

Public Member Functions

virtual int16 calculateMeasurements (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, floating_point expected_measurement[M])
 Function to calculate a measurement from current state of system.
virtual int16 calculateMeasurementsMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, floating_point measurement_Jacobian[M *N])
 Function to calculate the measurement function Jacobian from current state of system.

Detailed Description

template<uint32 N, uint32 M, uint32 O>
class warpos::Measurements< N, M, O >

The measurements class defines a generic, templated base class which may be used generically as a measurement update in the EKF measurement update class. The values N, M, O, and R 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] M - The number of measurements produced by the function. i.e. 2 for [range, rangerate]. Also the number of states in the R vector. O - The number of observer states. May be unused but could be i.e. another [x, y, z] for range

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

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

Member Function Documentation

◆ calculateMeasurements()

template<uint32 N, uint32 M, uint32 O>
virtual int16 warpos::Measurements< N, M, O >::calculateMeasurements ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
floating_point expected_measurement[M] )
inlinevirtual

Function to calculate a measurement from current state of system.

Parameters
[in]timeThe reference time
[in]tar_stateThe target reference state
[in]obs_stateThe observer reference state
[out]expected_measurementImplicit return of measurements based on time and state
Returns
Error return code, zero means no error

◆ calculateMeasurementsMatrix()

template<uint32 N, uint32 M, uint32 O>
virtual int16 warpos::Measurements< N, M, O >::calculateMeasurementsMatrix ( floating_point time,
const std::array< floating_point, N > & tar_state,
const std::array< floating_point, O > & obs_state,
floating_point measurement_Jacobian[M *N] )
inlinevirtual

Function to calculate the measurement 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]measurement_JacobianImplicit return of the measurement Jacobian w.r.t. the state vector, NOTE: the matrix is vectorized
Returns
Error return code, zero means no error

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