mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-peak.git
synced 2025-08-05 21:21:55 +00:00
Continued Madgwick filter implementation
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
#include <sta/math/quaternion.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace sta
|
||||
{
|
||||
namespace math
|
||||
@@ -22,7 +24,7 @@ namespace sta
|
||||
* @param n
|
||||
* @param alpha
|
||||
*/
|
||||
MadgwickFilter(Quaternion state, uint32_t n, float alpha);
|
||||
MadgwickFilter(Quaternion state, Quaternion direction, uint32_t n, float alpha);
|
||||
|
||||
/**
|
||||
* @brief Predicts the next step using rotation rate ingegration.
|
||||
@@ -36,7 +38,10 @@ namespace sta
|
||||
|
||||
void correct(float dx, float dy, float dz);
|
||||
private:
|
||||
Quaternion objective(Quaternion q, Quaternion s);
|
||||
|
||||
Quaternion state_;
|
||||
Quaternion direction_;
|
||||
uint32_t n_;
|
||||
float alpha_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user