Updated quaternion class, added attitude from tilt, started madgwick filter

This commit is contained in:
dario
2024-12-11 20:12:29 +01:00
parent 47ca310551
commit 3b11501f3b
2 changed files with 8 additions and 10 deletions

View File

@@ -6,15 +6,13 @@
*/
#include <sta/math/algorithms/attitude/madgwick.hpp>
#include <sta/math/linalg/matrix.hpp>
namespace sta
{
namespace math
{
MadgwickFilter::MadgwickFilter(Quaternion state, Quaternion direction, uint32_t n, float alpha)
: state_{state},
direction_{direction},
MadgwickFilter::MadgwickFilter(Quaternion state, uint32_t n, float alpha)
: state_{state.normalized()},
n_{n},
alpha_{alpha}
{