改imu数据
This commit is contained in:
parent
827a871299
commit
d5357ba317
@ -34,7 +34,7 @@ BMI088_Cali_t cali_bmi088= {
|
||||
};
|
||||
|
||||
static const KPID_Params_t imu_temp_ctrl_pid_param = {
|
||||
.k = 0.2f,
|
||||
.k = 0.3f,
|
||||
.p = 1.0f,
|
||||
.i = 0.01f,
|
||||
.d = 0.0f,
|
||||
@ -160,10 +160,10 @@ void Task_atti_esti(void *argument) {
|
||||
gyro_modified.y = -bmi088.gyro.x;
|
||||
gyro_modified.z = bmi088.gyro.z;
|
||||
|
||||
/* 欧拉角数据:roll和pitch互换 */
|
||||
/* 欧拉角数据:y取负值 */
|
||||
eulr_modified.yaw = eulr_to_send.yaw;
|
||||
eulr_modified.pit = eulr_to_send.rol; /* pitch = 原roll */
|
||||
eulr_modified.rol = eulr_to_send.pit; /* roll = 原pitch */
|
||||
eulr_modified.pit = -eulr_to_send.pit;
|
||||
eulr_modified.rol = eulr_to_send.rol;
|
||||
|
||||
osMessageQueueReset(task_runtime.msgq.imu.accl);
|
||||
osMessageQueueReset(task_runtime.msgq.imu.gyro);
|
||||
@ -174,7 +174,7 @@ void Task_atti_esti(void *argument) {
|
||||
osMessageQueuePut(task_runtime.msgq.imu.eulr, &eulr_modified, 0, 0);
|
||||
osMessageQueuePut(task_runtime.msgq.imu.quat, &gimbal_ahrs.quat, 0, 0);
|
||||
|
||||
BSP_PWM_SetComp(BSP_PWM_IMU_HEAT_PWM, PID_Calc(&imu_temp_ctrl_pid, 50.0f, bmi088.temp, 0.0f, 0.0f));
|
||||
BSP_PWM_SetComp(BSP_PWM_IMU_HEAT_PWM, PID_Calc(&imu_temp_ctrl_pid, 40.0f, bmi088.temp, 0.0f, 0.0f));
|
||||
|
||||
/* USER CODE END */
|
||||
osDelayUntil(tick); /* 运行结束,等待下一次唤醒 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user