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

Templated class to perform Nonlinear Least Squares. More...

#include <NonlinearLeastSquares.hpp>

Public Member Functions

 NonlinearLeastSquares (Integrator< N+N *N > &integ, Measurements< N, M, O > &measurement_ref)
int16 solve (const std::array< floating_point, N > &initial_guess, const clockwerk::Matrix< N, N > &P0, const clockwerk::Matrix< M, M > &R, const std::array< floating_point, M > *measurements_pointer, const floating_point *time_pointer, const std::array< floating_point, O > *obs_state_pointer, const uint32 num_measurements, const uint32 max_iterations, const floating_point tolerance, const floating_point max_step_size, clockwerk::Matrix< N, N > *covariance_estimate, std::array< floating_point, N > *state_estimate)
 Function to solve the nonlinear least squares problem.

Detailed Description

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

Templated class to perform Nonlinear Least Squares.

This class performs an iterative nonlinear least squares batch measurement update using the current state, an "observer state" which provides information (i.e. ground station information), and the associated measurement and H matrix functions. It requires three templated arguments, which are as follows: N - The number of target states estimated in the EKF M - The number of measurement states provided. Same as the number of noise states. O - The number of observer states used to support measurement generation

Author: Alex Jackson alex..nosp@m.jack.nosp@m.son@w.nosp@m.arpw.nosp@m.are.c.nosp@m.o

Constructor & Destructor Documentation

◆ NonlinearLeastSquares()

template<uint32 N, uint32 M, uint32 O>
warpos::NonlinearLeastSquares< N, M, O >::NonlinearLeastSquares ( Integrator< N+N *N > & integ,
Measurements< N, M, O > & measurement_ref )

Constructor

Parameters
[in]integReference to integrator for propagating state and STM
[in]measurement_refReference to measurement model

Member Function Documentation

◆ solve()

template<uint32 N, uint32 M, uint32 O>
int16 warpos::NonlinearLeastSquares< N, M, O >::solve ( const std::array< floating_point, N > & initial_guess,
const clockwerk::Matrix< N, N > & P0,
const clockwerk::Matrix< M, M > & R,
const std::array< floating_point, M > * measurements_pointer,
const floating_point * time_pointer,
const std::array< floating_point, O > * obs_state_pointer,
const uint32 num_measurements,
const uint32 max_iterations,
const floating_point tolerance,
const floating_point max_step_size,
clockwerk::Matrix< N, N > * covariance_estimate,
std::array< floating_point, N > * state_estimate )

Function to solve the nonlinear least squares problem.

Parameters
[in]initial_guessThe initial guess of the state
[in]P0The initial state covariance matrix
[in]RThe measurement noise covariance matrix
[in]measurements_pointerPointer to the first element of the array of measurements (note this is a nested array, each Mx1 measurement should be its own array inside of this array)
[in]time_pointerPointer to the first element of an array of time objects corresponding to each measurement
[in]obs_state_pointerPointer to the first element of an array of observer states (note this is a nested array, each Ox1 observer state should be its own array inside of this array)
[in]num_measurementsThe number of measurements (also the number of time stamps)
[in]max_iterationsThe maximum number of times to iterate before exiting
[in]toleranceThe convergence tolerance
[in]max_step_sizeThe maximum step size for the integrator
[out]covariance_estimateThe covariance estimate after the algorithm is run
[out]state_estimateThe state estimate after the algorithm is run
Returns
Error code corresponding to success/failure

The documentation for this class was generated from the following file: