Полный переход на C++

*Чтение IMU и обработка его данных выполняется в точности как в рабочей прошивке.
*Определение вращения работает корректно.
This commit is contained in:
2026-04-17 13:40:27 +03:00
parent a3d845df9e
commit 0faafbf089
21 changed files with 247 additions and 1210 deletions

27
Source/Control/Attitude.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
#ifndef ATTITUDE_H
#define ATTITUDE_H
#include "Quaternion.h"
#include "Vector.h"
#include "PID.h"
#include "RadioReceiver.h"
#include "IRS.h"
struct attitude_t
{
Vector3 gyro;
};
void attitude_init(attitude_t* att);
void attitude_controller_update(control_channels_t* control,
const rc_channels* rx,
const Quaternion* current_q,
const Vector3* gyro);
Quaternion rx_to_quaternion(const rc_channels* rx);
float constrain(float x, float min, float max);
#endif