![]() |
ModelSpace
Documentation for ModelSpace models and classes.
|
#include <PointingVectorMeasurements.hpp>

Public Member Functions | |
| PointingVectorMeasurements (uint32 state_quat_index, uint32 observer_pointing_index=0, uint32 observer_quat_index=3, uint32 meas_pointing_index=0) | |
| Constructor of the class. More... | |
| void | setNoiseStd (const std::array< floating_point, 3 > &new_std) |
| Setter function for the measurement noise standard deviation. More... | |
| int16 | calculateMeasurements (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS > &obs_state, std::array< floating_point, POINTING_MEASUREMENT_MEASUREMENT_VECTOR_ELEMENTS > &expected_measurement) override |
| Function to calculate a measurement from current state of system. More... | |
| int16 | calculateMeasurementsMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS > &obs_state, std::array< floating_point, POINTING_MEASUREMENT_MEASUREMENT_VECTOR_ELEMENTS *N > &measurement_Jacobian) override |
| Function to calculate the measurement function Jacobian from current state of system. More... | |
| int16 | calculateMeasurementNoiseMappingMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS > &obs_state, std::array< floating_point, POINTING_MEASUREMENT_MEASUREMENT_VECTOR_ELEMENTS *POINTING_MEASUREMENT_MEASUREMENT_NOISE_ELEMENTS > &measurement_mapping) override |
| Function to calculate the matrix that maps the noise configuration space to the measurement configuration space. More... | |
| int16 | calculateNoiseCovariance (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS > &obs_state, std::array< floating_point, POINTING_MEASUREMENT_MEASUREMENT_NOISE_ELEMENTS *POINTING_MEASUREMENT_MEASUREMENT_NOISE_ELEMENTS > &measurement_covariance) override |
| Function to calculate the covariance matrix of a given measurement with a specific noise profile. More... | |
Public Member Functions inherited from cfspp::Measurements< N, POINTING_MEASUREMENT_MEASUREMENT_VECTOR_ELEMENTS, POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS, POINTING_MEASUREMENT_MEASUREMENT_NOISE_ELEMENTS > | |
| virtual int16 | calculateMeasurements (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, M > &expected_measurement) |
| Function to calculate a measurement from current state of system. More... | |
| virtual int16 | calculateMeasurementsMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, M *N > &measurement_Jacobian) |
| Function to calculate the measurement function Jacobian from current state of system. More... | |
| virtual int16 | calculateMeasurementNoiseMappingMatrix (floating_point time, const std::array< floating_point, N > &tar_state, const std::array< floating_point, O > &obs_state, std::array< floating_point, M *R > &measurement_mapping) |
| Function to calculate the matrix that maps the noise configuration space to the measurement configuration space. More... | |
| 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, R *R > &measurement_covariance) |
| Function to calculate the covariance matrix of a given measurement with a specific noise profile. More... | |
The pointing vector measurements class is a specific implementation of the Measurements.hpp class that is to be used in the update step of an EKF when a pointing vector is available to report the partial attitude of the body. This class is an implementation of the update step, generalized to any state vector of any size that must have at most one part that is the attitude of the body frame with respect to the reference frame provided as a quaternion. This reference frame does not need to be inertial and can be as simple or complex as ECI or a secondary body frame. For the functions implemented in this class, the following format is expected by the required inputs:
time: floating_point -> Value does not matter and is not used tar_state: std::array of size N >= 4 -> Elements state_quat_index:state_quat_index+3 - Attitude of the body frame with respect to the reference frame as provided as an attitude quaternion obs_state: std::array of size POINTING_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS = 7 -> Elements observer_pointing_index:observer_pointing_index+2 - Expected pointing vector experienced at sensor frame as provided in reference frame coordinates -> Elements observer_quat_index:observer_quat_index+3 - Attitude of the sensor frame with respect to the body frame as provided as an attitude quaternion
IMPORTANT: This class can be used for any sensor that reports a pointing vector of some sort. Some examples of this would be a magnetometer or a sun sensor.
NOTE FOR MAGNETOMETER USE: The expected magnetic field vector is passed in externally and can be computed through models such as WMM or IGRF. This can be computationally very expensive though. Another approach that is available is to compute the magnetic field vectors of a range of expected locations offline, and use a look-up table to crudely approximate the magnetic field.
Author: James Tabony james.tabony@attx.tech
|
inline |
Constructor of the class.
| state_quat_index | Index in the state array that dictates when the quaternion part starts |
| observer_pointing_index | Index in the observer array that dictates when the expected pointing vector part starts [defualts to 0] |
| observer_quat_index | Index in the observer array that dictates when the quaternion part starts [defaults to 3] |
| meas_pointing_index | Index in the measurement array that dictates when the pointing vector part starts [defaults to 0] |
|
override |
Function to calculate the matrix that maps the noise configuration space to the measurement configuration space.
| [in] | time | The reference time |
| [in] | tar_state | The target reference state |
| [in] | obs_state | The observer reference state |
| [out] | measurement_mapping | Implicit return of the matrix (vectorized) that maps the noise space to the measurement space |
|
override |
Function to calculate a measurement from current state of system.
| [in] | time | The reference time |
| [in] | tar_state | The target reference state |
| [in] | obs_state | The observer reference state |
| [out] | expected_measurement | Implicit return of measurements based on time and state |
|
override |
Function to calculate the measurement function Jacobian from current state of system.
| [in] | time | The reference time |
| [in] | tar_state | The target reference state |
| [in] | obs_state | The observer reference state |
| [out] | measurement_Jacobian | Implicit return of the measurement Jacobian w.r.t. the state vector, NOTE: the matrix is vectorized |
|
override |
Function to calculate the covariance matrix of a given measurement with a specific noise profile.
| [in] | time | The reference time |
| [in] | tar_state | The target reference state |
| [in] | obs_state | The observer reference state |
| [out] | measurement_covariance | Implicit return of the measurement noise covariance (vectorized) |
|
inline |
Setter function for the measurement noise standard deviation.