mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-peak.git
synced 2025-12-16 18:18:03 +00:00
Added attitude determination
This commit is contained in:
35
include/sta/math/quaternion.hpp
Normal file
35
include/sta/math/quaternion.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* quaternion.hpp
|
||||
*
|
||||
* Created on: Jun 17, 2024
|
||||
* Author: Dario
|
||||
*/
|
||||
|
||||
#ifndef STA_PEAK_QUATERNION_HPP
|
||||
#define STA_PEAK_QUATERNION_HPP
|
||||
|
||||
namespace sta
|
||||
{
|
||||
namespace math {
|
||||
class Quaternion
|
||||
{
|
||||
public:
|
||||
Quaternion(float w, float x, float y, float z);
|
||||
|
||||
Quaternion();
|
||||
|
||||
static Quaternion unit();
|
||||
|
||||
float norm();
|
||||
|
||||
Quaternion normalized();
|
||||
|
||||
Quaternion operator+(const Quaternion& quat);
|
||||
Quaternion operator*(float scalar);
|
||||
public:
|
||||
float x, y, z, w;
|
||||
};
|
||||
} // namespace math
|
||||
} // namespace sta
|
||||
|
||||
#endif /* STA_PEAK_QUATERNION_HPP */
|
||||
Reference in New Issue
Block a user