From e4b43d5ba77f988d979af4f03247fa61f039b173 Mon Sep 17 00:00:00 2001 From: Yuichi Tadokoro Date: Thu, 22 Feb 2024 22:09:00 -0800 Subject: [PATCH 1/2] Fix equation docstring of QUEST algorithm --- ahrs/filters/quest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ahrs/filters/quest.py b/ahrs/filters/quest.py index a4f204e..c9d5b44 100644 --- a/ahrs/filters/quest.py +++ b/ahrs/filters/quest.py @@ -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: From 919be02c36fee4711b4b7042c2b453d3654d9b4b Mon Sep 17 00:00:00 2001 From: Yuichi Tadokoro Date: Thu, 22 Feb 2024 23:01:23 -0800 Subject: [PATCH 2/2] Fix other errors in docstring equations of QUEST --- ahrs/filters/quest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ahrs/filters/quest.py b/ahrs/filters/quest.py index c9d5b44..7e15eb5 100644 --- a/ahrs/filters/quest.py +++ b/ahrs/filters/quest.py @@ -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 @@ -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