Skip to content

Commit

Permalink
Correct docstrings to change to negative skew-symmetric matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayitzin committed Sep 7, 2023
1 parent e5fc27f commit 4c5eb50
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ahrs/filters/ekf.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
.. math::
\\boldsymbol\\Omega_t =
\\begin{bmatrix}
0 & -\\boldsymbol\\omega^T\\\\ \\boldsymbol\\omega & \\lfloor\\boldsymbol\\omega\\rfloor_\\times
0 & -\\boldsymbol\\omega^T\\\\ \\boldsymbol\\omega & -\\lfloor\\boldsymbol\\omega\\rfloor_\\times
\\end{bmatrix} =
\\begin{bmatrix}
0 & -\\omega_x & -\\omega_y & -\\omega_z \\\\
Expand Down Expand Up @@ -350,8 +350,9 @@
The error of the approximation vanishes rapidly at higher orders, or when the
time step :math:`\\Delta t \\to 0`. The more terms we have, the better our
approximation becomes, with the downside of a big computational demand. For
simple architectures (like embedded systems) we can reduce this burden by
approximation becomes, with the downside of a big computational demand.
For simple architectures (like embedded systems) we can reduce this burden by
truncating the series to its second term making it a **First Order EKF** [#]_,
and achieving fairly good results. Thus, our **process model** shortens to:
Expand Down Expand Up @@ -1142,13 +1143,14 @@ def Omega(self, x: np.ndarray) -> np.ndarray:
.. math::
\\boldsymbol\\Omega(\\mathbf{x}) =
\\begin{bmatrix}
0 & -\\mathbf{x}^T \\\\ \\mathbf{x} & \\lfloor\\mathbf{x}\\rfloor_\\times
0 & -\\mathbf{x}^T \\\\
\\mathbf{x} & -\\lfloor\\mathbf{x}\\rfloor_\\times
\\end{bmatrix} =
\\begin{bmatrix}
0 & -x_1 & -x_2 & -x_3 \\\\
x_1 & 0 & x_3 & -x_2 \\\\
x_2 & -x_3 & 0 & x_1 \\\\
x_3 & x_2 & -x_1 & 0
0 & -x_1 & -x_2 & -x_3 \\\\
x_1 & 0 & x_3 & -x_2 \\\\
x_2 & -x_3 & 0 & x_1 \\\\
x_3 & x_2 & -x_1 & 0
\\end{bmatrix}
This operator is constantly used at different steps of the EKF.
Expand All @@ -1174,7 +1176,7 @@ def f(self, q: np.ndarray, omega: np.ndarray, dt: float) -> np.ndarray:
Linearized function of Process Model (Prediction.)
.. math::
\\mathbf{f}(\\mathbf{q}_{t-1}) = \\Big(\\mathbf{I}_4 + \\frac{\\Delta t}{2}\\boldsymbol\\Omega_t\\Big)\\mathbf{q}_{t-1} =
\\mathbf{f}(\\mathbf{q}_{t-1}, \\Delta t) = \\Big(\\mathbf{I}_4 + \\frac{\\Delta t}{2}\\boldsymbol\\Omega_t\\Big)\\mathbf{q}_{t-1} =
\\begin{bmatrix}
q_w - \\frac{\\Delta t}{2} \\omega_x q_x - \\frac{\\Delta t}{2} \\omega_y q_y - \\frac{\\Delta t}{2} \\omega_z q_z\\\\
q_x + \\frac{\\Delta t}{2} \\omega_x q_w - \\frac{\\Delta t}{2} \\omega_y q_z + \\frac{\\Delta t}{2} \\omega_z q_y\\\\
Expand Down

0 comments on commit 4c5eb50

Please sign in to comment.