From 7533a9cbfade68e3404a5ce7ef48e0b5778c3c00 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 23 Dec 2024 02:37:03 +0300 Subject: [PATCH] Move ONE_G definition to flix.ino --- flix/estimate.ino | 1 - flix/flix.ino | 2 ++ flix/imu.ino | 2 -- gazebo/flix.h | 2 ++ 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flix/estimate.ino b/flix/estimate.ino index cf63ee3..b0fae96 100644 --- a/flix/estimate.ino +++ b/flix/estimate.ino @@ -7,7 +7,6 @@ #include "vector.h" #include "lpf.h" -#define ONE_G 9.807f #define WEIGHT_ACC 0.5f #define RATES_LFP_ALPHA 0.2 // cutoff frequency ~ 40 Hz diff --git a/flix/flix.ino b/flix/flix.ino index dea10d9..34335c2 100644 --- a/flix/flix.ino +++ b/flix/flix.ino @@ -23,6 +23,8 @@ #define MOTOR_FRONT_RIGHT 2 #define MOTOR_FRONT_LEFT 3 +#define ONE_G 9.80665 + float t = NAN; // current step time, s float dt; // time delta from previous step, s float loopRate; // loop rate, Hz diff --git a/flix/imu.ino b/flix/imu.ino index e9d9969..5475e9e 100644 --- a/flix/imu.ino +++ b/flix/imu.ino @@ -6,8 +6,6 @@ #include #include -#define ONE_G 9.80665 - // NOTE: use 'ca' command to calibrate the accelerometer and put the values here Vector accBias(0, 0, 0); Vector accScale(1, 1, 1); diff --git a/gazebo/flix.h b/gazebo/flix.h index 72787f5..26cbbec 100644 --- a/gazebo/flix.h +++ b/gazebo/flix.h @@ -19,6 +19,8 @@ #define WIFI_ENABLED 1 +#define ONE_G 9.80665 + float t = NAN; float dt; float loopRate;