Library Functions.
More...
|
| void | TM_AHRSIMU_Init (TM_AHRSIMU_t *AHRSIMU, float sampleRate, float beta, float inclination) |
| | Initializes ARHS or IMU algorithm for motion calculations. More...
|
| |
| void | TM_AHRSIMU_UpdateAHRS (TM_AHRSIMU_t *AHRSIMU, float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz) |
| | Updates AHRS algorithm with new values and calculates roll, pitch and yaw angles. More...
|
| |
| void | TM_AHRSIMU_UpdateIMU (TM_AHRSIMU_t *AHRSIMU, float gx, float gy, float gz, float ax, float ay, float az) |
| | Updates IMU algorithm with new values and calculates roll, pitch and yaw angles. More...
|
| |
Library Functions.
| void TM_AHRSIMU_Init |
( |
TM_AHRSIMU_t * |
AHRSIMU, |
|
|
float |
sampleRate, |
|
|
float |
beta, |
|
|
float |
inclination |
|
) |
| |
Initializes ARHS or IMU algorithm for motion calculations.
- Parameters
-
| *AHRSIMU | Pointer to TM_AHRSIMU_t empty structure |
| sampleRate | Sample rate frequency for updating data |
| beta | Gain for calculations and speed to stabilize. A value less than 0.2 is a good value but it mostly depends on applicaiton. |
| inclination | Magnetic inclination for position on earth in units of degrees. This value depends on GPS coordinates on earth. |
- Return values
-
| void TM_AHRSIMU_UpdateAHRS |
( |
TM_AHRSIMU_t * |
AHRSIMU, |
|
|
float |
gx, |
|
|
float |
gy, |
|
|
float |
gz, |
|
|
float |
ax, |
|
|
float |
ay, |
|
|
float |
az, |
|
|
float |
mx, |
|
|
float |
my, |
|
|
float |
mz |
|
) |
| |
Updates AHRS algorithm with new values and calculates roll, pitch and yaw angles.
- Parameters
-
| *AHRSIMU | Pointer to TM_AHRSIMU_t empty structure |
| gx,gy,gz | Gyro data for X, Y and Z axis respectively. These parameters must be in units of rad/s. Use AHRSIMU_DEG2RAD if your gyro outputs data in deg/s. |
| ax,ay,az | Accelerometer data for X, Y and Z axis respectively. These parameters must be in units of gees. |
| mx,my,mz | Magnetic data for X, Y and Z axis respectively. These parameters must be in units of uT (micro Tesla). When all parameters are zero (magnetic sensor not used), TM_AHRSIMU_UpdateIMU is automatically called. |
- Return values
-
| void TM_AHRSIMU_UpdateIMU |
( |
TM_AHRSIMU_t * |
AHRSIMU, |
|
|
float |
gx, |
|
|
float |
gy, |
|
|
float |
gz, |
|
|
float |
ax, |
|
|
float |
ay, |
|
|
float |
az |
|
) |
| |
Updates IMU algorithm with new values and calculates roll, pitch and yaw angles.
- Parameters
-
| *AHRSIMU | Pointer to TM_AHRSIMU_t empty structure |
| gx,gy,gz | Gyro data for X, Y and Z axis respectively. These parameters must be in units of rad/s. Use AHRSIMU_DEG2RAD if your gyro outputs data in deg/s. |
| ax,ay,az | Accelerometer data for X, Y and Z axis respectively. These parameters must be in units of gees. |
- Return values
-