Basic_Frame_TypeC_2023_Omni
Loading...
Searching...
No Matches
attitude_defines.h
1
#ifndef __ATTITUDE_RESOLUTION_DEFINES_H
2
#define __ATTITUDE_RESOLUTION_DEFINES_H
3
4
/* =========================================================================
5
* ANGLE PROCESS DEFINES
6
* ====================================================================== */
7
#define ACCEL_WEIGHT \
8
0.01f
// Define the weight of the accelerometer data, adjust according to the actual situation
9
#define GYRO_WEIGHT \
10
(1.0f - \
11
ACCEL_WEIGHT)
// Define the weight of the gyroscope data, adjust according to the actual situation
12
13
// TODO: Investigate this sampling dt
14
#define SAMPLE_DT \
15
0.0001f
// Define the sampling period, adjust according to the actual situation
16
17
/* =========================================================================
18
* MADGWICK DEFINES
19
* ====================================================================== */
20
#define sampleFreq 500.0f
// sample frequency in Hz
21
#define betaDef 0.5f
// 2 * proportional gain 0.1
22
23
/* =========================================================================
24
* MAHONY DEFINES
25
* ====================================================================== */
26
// #define sampleFreq 1000.0f // sample frequency in Hz
27
#define twoKpDef (2.0f * 0.5f)
// 2 * proportional gain
28
#define twoKiDef (2.0f * 0.001f)
// 2 * integral gain
29
30
#endif
Core
Src
Algorithms
attitude
attitude_defines.h
Generated by
1.14.0