Rleg  2
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions
calibration.h File Reference
#include "../communication/communication.h"
Include dependency graph for calibration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SUCCESS   1
 
#define FAILURE   -1
 
#define ACC_BIAS_X   19.2
 
#define ACC_BIAS_Y   6.024
 
#define ACC_BIAS_Z   -18.97
 
#define ACC_FS_X   262.82
 
#define ACC_FS_Y   262.15
 
#define ACC_FS_Z   252.20
 
#define MAG_BIAS_X   -143
 
#define MAG_BIAS_Y   -101
 
#define MAG_BIAS_Z   3
 
#define MAG_FS_X   177
 
#define MAG_FS_Y   139
 
#define MAG_FS_Z   85
 
#define GYR_BIAS_X   -60.9046
 
#define GYR_BIAS_Y   40.9062
 
#define GYR_BIAS_Z   0.8769
 
#define GYR_FS_X   0.001214142
 
#define GYR_FS_Y   0.001214142
 
#define GYR_FS_Z   0.001214142
 
#define ENC_FS   0.08789062
 
#define ENC_MAX   4096
 

Functions

void calibrate_all (IMU_DATA_STRUCT *imu_data)
 Calibrate all sensors. More...
 
void calibrate_imu (IMU_DATA_STRUCT *imu_data)
 Calibrate imu sensors. More...
 
void calibrate_enc (ENC_DATA_STRUCT *enc_data)
 Calibrate encoder to return values in the rage of 0 to 90. More...
 

Macro Definition Documentation

#define ACC_BIAS_X   19.2

Definition at line 15 of file calibration.h.

Referenced by calibrate_imu().

#define ACC_BIAS_Y   6.024

Definition at line 16 of file calibration.h.

Referenced by calibrate_imu().

#define ACC_BIAS_Z   -18.97

Definition at line 17 of file calibration.h.

Referenced by calibrate_imu().

#define ACC_FS_X   262.82

Definition at line 18 of file calibration.h.

Referenced by calibrate_imu().

#define ACC_FS_Y   262.15

Definition at line 19 of file calibration.h.

Referenced by calibrate_imu().

#define ACC_FS_Z   252.20

Definition at line 20 of file calibration.h.

Referenced by calibrate_imu().

#define ENC_FS   0.08789062

Definition at line 38 of file calibration.h.

Referenced by calibrate_enc().

#define ENC_MAX   4096

Definition at line 39 of file calibration.h.

Referenced by calibrate_enc().

#define FAILURE   -1
#define GYR_BIAS_X   -60.9046

Definition at line 30 of file calibration.h.

Referenced by calibrate_imu().

#define GYR_BIAS_Y   40.9062

Definition at line 31 of file calibration.h.

Referenced by calibrate_imu().

#define GYR_BIAS_Z   0.8769

Definition at line 32 of file calibration.h.

Referenced by calibrate_imu().

#define GYR_FS_X   0.001214142

Definition at line 33 of file calibration.h.

Referenced by calibrate_imu().

#define GYR_FS_Y   0.001214142

Definition at line 34 of file calibration.h.

Referenced by calibrate_imu().

#define GYR_FS_Z   0.001214142

Definition at line 35 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_BIAS_X   -143

Definition at line 22 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_BIAS_Y   -101

Definition at line 23 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_BIAS_Z   3

Definition at line 24 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_FS_X   177

Definition at line 25 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_FS_Y   139

Definition at line 26 of file calibration.h.

Referenced by calibrate_imu().

#define MAG_FS_Z   85

Definition at line 27 of file calibration.h.

Referenced by calibrate_imu().

#define SUCCESS   1

Function Documentation

void calibrate_enc ( ENC_DATA_STRUCT enc_data)

Calibrate encoder to return values in the rage of 0 to 90.

Definition at line 33 of file calibration.c.

33  {
34  enc_data->calib.position = ((ENC_MAX - enc_data->position)/ENC_FS);
35 }
#define ENC_MAX
Definition: calibration.h:39
#define ENC_FS
Definition: calibration.h:38
struct ENC_DATA_STRUCT::calibrate calib
unsigned short int position
unsigned short int position