#pragma once #ifndef IRS_H #define IRS_H #include "quaternion.h" #include "vector.h" Quaternion orientationQuat; Vector3 tilts; // local oriented sinX sinY cosZ typedef struct { Vector3 Gyro, Accel; } IMU; // последние значения датчиков typedef struct { Vector3 Accel, Spd, Pos; } Inertial; // инерциальные значения движения void updateGyro(Vector3* gyro, const Vector3* newGyro); void updateAccel(Vector3* accel, const Vector3* newAccel); void setShiftAlpha(const Vector3* pos, const Vector3* spd, const float* qua); // коэффициент восстановления позиции и скорости в секунду void updatePosSpeed(); void updateQuat(); void restoreAllShift(); void setAccelShift(); void getSinXYCosZ(); void getRollPitchYaw(); void getInertial(); #endif