mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
新增通用定义头文件,主要内容是角度转换.统一控制的输入,为后续model-based控制做准备
This commit is contained in:
13
modules/general_def.h
Normal file
13
modules/general_def.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef GENERAL_DEF_H
|
||||
#define GENERAL_DEF_H
|
||||
|
||||
#define PI 3.1415926535f
|
||||
#define PI2 (PI * 2.0f) // 2 pi
|
||||
|
||||
#define RAD_2_ANGLE (180.0f / PI)
|
||||
#define ANGLE_2_RAD (PI / 180.0f)
|
||||
|
||||
#define RPM_2_ANGLE_PER_SEC (360.0f/60.0f) // ×360°/60sec
|
||||
|
||||
|
||||
#endif // !GENERAL_DEF_H
|
||||
Reference in New Issue
Block a user