Skip to content

Commit

Permalink
Merge pull request #108 from tokoro10g/fix-quest-equation
Browse files Browse the repository at this point in the history
Fix equation docstring of QUEST algorithm
  • Loading branch information
Mayitzin committed Apr 7, 2024
2 parents 48ed893 + 919be02 commit 606dd5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ahrs/filters/quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
that minimizes the loss function:
.. math::
L(\\mathbf{A}) = \\frac{1}{2}\\sum_{i=1}^n |\\hat{\\mathbf{W}}_i - \\mathbf{A}\\hat{\\mathbf{V}}_i|^2
L(\\mathbf{A}) = \\frac{1}{2}\\sum_{i=1}^n a_i |\\hat{\\mathbf{W}}_i - \\mathbf{A}\\hat{\\mathbf{V}}_i|^2
where :math:`a_i` are a set of non-negative weights such that :math:`\\sum_{i=1}^na_i=1`,
:math:`\\hat{\\mathbf{V}}_i` are nonparallel **reference vectors**, and
Expand All @@ -31,7 +31,7 @@
of a matrix, and :math:`\\mathbf{B}` is the **attitude profile matrix**:
.. math::
\\mathbf{B} = \\sum_{i=1}^na_i\\hat{\\mathbf{W}}_i^T\\hat{\\mathbf{V}}_i
\\mathbf{B} = \\sum_{i=1}^na_i\\hat{\\mathbf{W}}_i\\hat{\\mathbf{V}}_i^T
The quaternion :math:`\\bar{\\mathbf{q}}` representing a rotation is defined by
Shuster as:
Expand All @@ -58,7 +58,7 @@
The attitude matrix :math:`\\mathbf{A}` is related to the quaternion by:
.. math::
\\mathbf{A}(\\bar{\\mathbf{q}}) = (q^2+\\mathbf{Q}\\cdot\\mathbf{Q})\\mathbf{I} + 2\\mathbf{QQ}^T + 2q\\lfloor\\mathbf{Q}\\rfloor_\\times
\\mathbf{A}(\\bar{\\mathbf{q}}) = (q^2-\\mathbf{Q}\\cdot\\mathbf{Q})\\mathbf{I} + 2\\mathbf{QQ}^T + 2q\\lfloor\\mathbf{Q}\\rfloor_\\times
where :math:`\\mathbf{I}` is the identity matrix, and :math:`\\lfloor\\mathbf{Q}\\rfloor_\\times`
is the **antisymmetric matrix** of :math:`\\mathbf{Q}`, a.k.a. the
Expand Down

0 comments on commit 606dd5d

Please sign in to comment.