diff --git a/Source/INS/IRS.h b/Source/INS/IRS.h index 1645a77..18ba789 100644 --- a/Source/INS/IRS.h +++ b/Source/INS/IRS.h @@ -6,33 +6,35 @@ #include "quaternion.h" #include "vector.h" -Quaternion orientationQuat; -Vector3 tilts; // local oriented sinX sinY cosZ - typedef struct { - Vector3 Gyro, Accel; -} IMU; // последние значения датчиков + Quaternion orientationQ; // главный кватерион ориентации + // Vector3 tilts; // локально ориентированные наклоны sinX sinY cosZ + + Vector3 gyro, accel; // последние значения датчиков + + float roll, pitch, yaw; -typedef struct -{ - Vector3 Accel, Spd, Pos; -} Inertial; // инерциальные значения движения + // Vector3 accel, spd, pos; // инерциальные значения движения +} IRS; + +void updateIRS(IRS* irs, const Vector3* gyro, const Vector3* accel, float dt); +void IRSgetEuler(const IRS* irs); 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 setShiftAlpha(const Vector3* pos, const Vector3* spd, const float* qua); // коэффициент восстановления позиции и скорости в секунду -void updatePosSpeed(); +// void updatePosSpeed(); void updateQuat(); -void restoreAllShift(); +// void restoreAllShift(); -void setAccelShift(); +// void setAccelShift(); -void getSinXYCosZ(); -void getRollPitchYaw(); -void getInertial(); +// void getSinXYCosZ(); +// void getRollPitchYaw(); +// void getInertial(); #endif \ No newline at end of file