24 lines
415 B
C
24 lines
415 B
C
#ifndef IRS_H
|
|
#define IRS_H
|
|
|
|
#include "quaternion.h"
|
|
#include "vector.h"
|
|
|
|
#define PI 3.14159265359f
|
|
#define DEG2RAD PI / 180.0f
|
|
|
|
typedef struct
|
|
{
|
|
Quaternion q; // ориентация
|
|
Vector3 gyro; // deg/s
|
|
Vector3 accel; // g
|
|
|
|
} IRS;
|
|
|
|
void IRS_init(IRS* irs);
|
|
|
|
void IRS_update(IRS* irs, const Vector3* gyro, const Vector3* accel, float dt);
|
|
|
|
Vector3 IRS_getGravity(const Quaternion* q);
|
|
|
|
#endif |