parent
5c70e4d1b7
commit
9ae974deab
|
@ -10,6 +10,18 @@
|
||||||
#define ALPHA ( 0.01f ) // Complementary
|
#define ALPHA ( 0.01f ) // Complementary
|
||||||
// Filter Constant
|
// Filter Constant
|
||||||
|
|
||||||
|
// LSM303DLHC temperature compensation coefficients
|
||||||
|
#define SCALE_Z ( 1.0f ) // Scale for Z-axis
|
||||||
|
#define OFFSET_Z ( 3.0f ) // Offset for Z-axis
|
||||||
|
|
||||||
|
#define TEMPERATURE_OFFSET ( 25.0f ) // Reference
|
||||||
|
// temperature for
|
||||||
|
// calibration
|
||||||
|
|
||||||
|
#define TEMPERATURE_COEFFICIENT_Z ( 0.33f ) // Temperature
|
||||||
|
// coefficient for
|
||||||
|
// Z-axis
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The orientation of the car
|
* @brief The orientation of the car
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -28,15 +28,7 @@
|
||||||
#define LSM303_TEMP_OUT_H_M 0x31
|
#define LSM303_TEMP_OUT_H_M 0x31
|
||||||
#define LSM303_TEMP_OUT_L_M 0x32
|
#define LSM303_TEMP_OUT_L_M 0x32
|
||||||
|
|
||||||
// LSM303DLHC temperature compensation coefficients
|
|
||||||
#define SCALE_Z 0.9 // Scale factor for Z-axis
|
|
||||||
#define OFFSET_Z 5.0 // Offset for Z-axis
|
|
||||||
|
|
||||||
#define TEMPERATURE_OFFSET 25.0 // Reference temperature for calibration
|
|
||||||
#define TEMPERATURE_COEFFICIENT_Z 0.33
|
|
||||||
|
|
||||||
#define OFFSET_Z 5.0
|
|
||||||
#define SCALE_Z 0.9
|
|
||||||
|
|
||||||
#define ACCEL_ADDR 0x19
|
#define ACCEL_ADDR 0x19
|
||||||
#define MAG_ADDR 0x1E
|
#define MAG_ADDR 0x1E
|
||||||
|
|
|
@ -30,9 +30,9 @@ main (void)
|
||||||
{
|
{
|
||||||
stdio_usb_init();
|
stdio_usb_init();
|
||||||
|
|
||||||
sleep_ms(2000);
|
// sleep_ms(2000);
|
||||||
|
|
||||||
printf("Test started!\n");
|
// printf("Test started!\n");
|
||||||
magnetometer_init();
|
magnetometer_init();
|
||||||
|
|
||||||
launch();
|
launch();
|
||||||
|
|
Loading…
Reference in New Issue