1.在IMU四元数解算文件内添加 #include <arm_math.h>。

 

2.支持更为快速的sin/cos三角函数运算,需添加以下三个文件:

STM32F4xx添加浮点运算解算IMU(CubeMX + μVision 5.14)

 

①arm_cos_f32.c,arm_sin_f32.c位于:

Drivers\CMSIS\DSP\Source\FastMathFunctions\

 ②arm_cortexM4lf_math.lib位于:

Drivers\CMSIS\Lib\ARM\

3.编译器Options for... -> C/C++ define 添加

ARM_MATH_CM4,__CC_ARM,__FPU_PRESENT

编译器warning  redefine __FPU_PRESENT in stm32f401xe.h:

屏蔽stm32f401xe.h:

// #define __FPU_PRESENT             1U       /*!< FPU present   

 

第2步加与不加的区别:解算速度更快。

AHRS稳定可用。

 

相关文章:

  • 2021-11-18
  • 2021-09-04
  • 2022-12-23
  • 2021-10-02
  • 2021-09-23
猜你喜欢
  • 2021-06-27
  • 2021-11-30
  • 2021-12-08
  • 2021-09-11
  • 2021-10-11
  • 2021-08-04
相关资源
相似解决方案