@@ -42,6 +42,7 @@ For more information, please refer to <https://unlicense.org> */
42
42
// ! @file
43
43
// ! @brief The main Kalman filter class.
44
44
45
+ #include " internal/format.hpp"
45
46
#include " internal/kalman.hpp"
46
47
47
48
#include < concepts>
@@ -602,6 +603,11 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
602
603
603
604
// ! @brief Sets the state transition matrix F function.
604
605
// !
606
+ // ! @details For non-linear system, or extended filter, F is the Jacobian of
607
+ // ! the state transition function: `F = ∂f/∂X = ∂fj/∂xi` that is each row i
608
+ // ! contains the derivatives of the state transition function for every
609
+ // ! element j in the state vector X.
610
+ // !
605
611
// ! @param callable The copied target Callable object (function object,
606
612
// ! pointer to function, reference to function, pointer to member function, or
607
613
// ! pointer to data member) that will be bound to the prediction arguments and
@@ -619,6 +625,11 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
619
625
620
626
// ! @brief Sets the state transition matrix F function.
621
627
// !
628
+ // ! @details For non-linear system, or extended filter, F is the Jacobian of
629
+ // ! the state transition function: `F = ∂f/∂X = ∂fj/∂xi` that is each row i
630
+ // ! contains the derivatives of the state transition function for every
631
+ // ! element j in the state vector X.
632
+ // !
622
633
// ! @param callable The moved target Callable object (function object,
623
634
// ! pointer to function, reference to function, pointer to member function, or
624
635
// ! pointer to data member) that will be bound to the prediction arguments and
@@ -679,6 +690,11 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
679
690
680
691
// ! @brief Sets the observation, measurement transition matrix H function.
681
692
// !
693
+ // ! @details For non-linear system, or extended filter, H is the Jacobian of
694
+ // ! the state observation function: `H = ∂h/∂X = ∂hj/∂xi` that is each row i
695
+ // ! contains the derivatives of the state observation function for every
696
+ // ! element j in the state vector X.
697
+ // !
682
698
// ! @param callable The copied target Callable object (function object,
683
699
// ! pointer to function, reference to function, pointer to member function, or
684
700
// ! pointer to data member) that will be bound to the prediction arguments and
@@ -698,6 +714,11 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
698
714
699
715
// ! @brief Sets the observation, measurement transition matrix H function.
700
716
// !
717
+ // ! @details For non-linear system, or extended filter, H is the Jacobian of
718
+ // ! the state observation function: `H = ∂h/∂X = ∂hj/∂xi` that is each row i
719
+ // ! contains the derivatives of the state observation function for every
720
+ // ! element j in the state vector X.
721
+ // !
701
722
// ! @param callable The moved target Callable object (function object,
702
723
// ! pointer to function, reference to function, pointer to member function, or
703
724
// ! pointer to data member) that will be bound to the prediction arguments and
@@ -817,6 +838,17 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
817
838
" discarded." )]] inline constexpr auto
818
839
s () const -> innovation_uncertainty;
819
840
841
+ // ! @brief Sets the extended state transition function f(x).
842
+ // !
843
+ // ! @param callable The copied target Callable object (function object,
844
+ // ! pointer to function, reference to function, pointer to member function, or
845
+ // ! pointer to data member) that will be called to compute the next state X on
846
+ // ! prediction steps. The default function `f(x) = F * X` is suitable for
847
+ // ! linear systems. For non-linear system, or extended filter, implement a
848
+ // ! linearization of the transition function f and the state transition F
849
+ // ! matrix is the Jacobian of the state transition function.
850
+ // !
851
+ // ! @complexity Constant.
820
852
inline constexpr void
821
853
transition (const auto &callable) requires std::is_invocable_r_v < state,
822
854
std::decay_t <decltype(callable)>,
@@ -825,6 +857,17 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
825
857
filter.transition = callable;
826
858
}
827
859
860
+ // ! @brief Sets the extended state transition function f(x).
861
+ // !
862
+ // ! @param callable The moved target Callable object (function object,
863
+ // ! pointer to function, reference to function, pointer to member function, or
864
+ // ! pointer to data member) that will be called to compute the next state X on
865
+ // ! prediction steps. The default function `f(x) = F * X` is suitable for
866
+ // ! linear systems. For non-linear system, or extended filter, implement a
867
+ // ! linearization of the transition function f and the state transition F
868
+ // ! matrix is the Jacobian of the state transition function.
869
+ // !
870
+ // ! @complexity Constant.
828
871
inline constexpr void
829
872
transition (auto &&callable) requires std::is_invocable_r_v < state,
830
873
std::decay_t <decltype(callable)>,
@@ -833,6 +876,17 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
833
876
filter.transition = std::forward<decltype (callable)>(callable);
834
877
}
835
878
879
+ // ! @brief Sets the extended state observation function h(x).
880
+ // !
881
+ // ! @param callable The copied target Callable object (function object,
882
+ // ! pointer to function, reference to function, pointer to member function, or
883
+ // ! pointer to data member) that will be called to compute the observation Z
884
+ // ! on update steps. The default function `h(x) = H * X` is suitable for
885
+ // ! linear systems. For non-linear system, or extended filter, the client
886
+ // ! implements a linearization of the observation function hand the state
887
+ // ! observation H matrix is the Jacobian of the state observation function.
888
+ // !
889
+ // ! @complexity Constant.
836
890
inline constexpr void
837
891
observation (const auto &callable) requires std::is_invocable_r_v < output,
838
892
std::decay_t <decltype(callable)>,
@@ -841,6 +895,17 @@ class kalman<Type, State, Output, Input, Transpose, Symmetrize, Divide,
841
895
filter.observation = callable;
842
896
}
843
897
898
+ // ! @brief Sets the extended state observation function h(x).
899
+ // !
900
+ // ! @param callable The moved target Callable object (function object,
901
+ // ! pointer to function, reference to function, pointer to member function, or
902
+ // ! pointer to data member) that will be called to compute the observation Z
903
+ // ! on update steps. The default function `h(x) = H * X` is suitable for
904
+ // ! linear systems. For non-linear system, or extended filter, the client
905
+ // ! implements a linearization of the observation function hand the state
906
+ // ! observation H matrix is the Jacobian of the state observation function.
907
+ // !
908
+ // ! @complexity Constant.
844
909
inline constexpr void
845
910
observation (auto &&callable) requires std::is_invocable_r_v < output,
846
911
std::decay_t <decltype(callable)>,
0 commit comments