fix: remove attitude_t, unify with INS_t

- Delete attitude_t struct from ins_task.h
- INS_Init() returns INS_t* directly instead of casting from INS.Gyro offset
- Change Gimbal_Upload_Data_s.gimbal_imu_data to INS_t* pointer
- Update gimbal.c and robot_cmd.c accordingly
This commit is contained in:
2026-05-30 00:27:39 +08:00
parent 9b52a9ec64
commit ea493af11f
6 changed files with 18 additions and 28 deletions
+1 -12
View File
@@ -25,17 +25,6 @@
#define INS_TASK_PERIOD 1
typedef struct
{
float Gyro[3]; // 角速度
float Accel[3]; // 加速度
// 还需要增加角速度数据
float Roll;
float Pitch;
float Yaw;
float YawTotalAngle;
} attitude_t; // 最终解算得到的角度,以及yaw转动的总角度(方便多圈控制)
typedef struct
{
float q[4]; // 四元数估计值
@@ -82,7 +71,7 @@ typedef struct
* @brief 初始化惯导解算系统
*
*/
attitude_t *INS_Init(void);
INS_t *INS_Init(void);
/**
* @brief 此函数放入实时系统中,以1kHz频率运行