From 7d4354f65e031c1123ec56d0fed26b84dbef4f84 Mon Sep 17 00:00:00 2001 From: Francois Carouge Date: Sat, 27 Aug 2022 15:56:58 -0700 Subject: [PATCH] [filter] virtual destructor --- include/fcarouge/kalman.hpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/include/fcarouge/kalman.hpp b/include/fcarouge/kalman.hpp index 4a97110c3..c6a1d92f7 100644 --- a/include/fcarouge/kalman.hpp +++ b/include/fcarouge/kalman.hpp @@ -82,14 +82,16 @@ template using pack = internal::pack; //! @brief Kalman filter. //! -//! @details A Bayesian filter that uses multivariate Gaussians. +//! @details A Bayesian filter that uses multivariate Gaussians, a recursive +//! state estimator, and a linear quadratic estimator (LQE). //! //! Applicable for unimodal and uncorrelated uncertainties. Kalman filters //! assume white noise, propagation and measurement functions are //! differentiable, and that the uncertainty stays centered on the state -//! estimate. The filter updates estimates by multiplying Gaussians and predicts -//! estimates by adding Gaussians. Design the state (X, P), the process (F, Q), -//! the measurement (Z, R), the measurement function H, and if the system has +//! estimate. The filter is the optimal linear filter under assumptions. The +//! filter updates estimates by multiplying Gaussians and predicts estimates by +//! adding Gaussians. Design the state (X, P), the process (F, Q), the +//! measurement (Z, R), the measurement function H, and if the system has //! control inputs (U, B). Designing a filter is as much art as science. //! //! Filters with `state x output x input` dimensions as 1x1x1 and 1x1x0 (no @@ -152,9 +154,7 @@ template using pack = internal::pack; //! @todo Would we want to support smoothers? //! @todo How to add or associate constraints on the types and operation to //! support compilation and semantics? -//! @todo Which constructors to support? -//! @todo Is the Kalman filter a recursive state estimation, confirm -//! terminology? +//! @todo Which constructors to support? Consider constructors? CTAD? Guides? //! @todo Prepare support for larger dataset recording for graphing, metrics of //! large test data to facilitate tuning. //! @todo Support filter generator? Integration? Reflection in C++... @@ -170,13 +170,11 @@ template using pack = internal::pack; //! the state X always what the user would want? //! @todo Consider if a fluent interface would be preferable for //! characteristics? -//! @todo Consider additional constructors? //! @todo Consider additional characteristics method overloads? //! @todo A clear or reset member equivalent may be useful for real-time //! re-initializations but to what default? -//! @todo Could the Input be void by default? Or empty? //! @todo Expand std::format support with standard arguments and Eigen3 types. -//! @todo Support complex number filters? +//! @todo Support, test complex number filters? template < typename State = double, typename Output = double, typename Input = void, typename Transpose = std::identity, typename Symmetrize = std::identity, @@ -378,7 +376,7 @@ class kalman //! @brief Destructs the kalman filter. //! //! @complexity Constant. - inline constexpr ~kalman() = default; + inline constexpr virtual ~kalman() = default; //! @}