From b04c40ce16438902f7568a1bb21cd23f7e5e077f Mon Sep 17 00:00:00 2001 From: Mike Bernard Date: Tue, 10 Nov 2020 23:57:01 -0500 Subject: [PATCH] update warning comments re. changing constants --- src/main.ino | 6 +++--- src/mission_constants.hh | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.ino b/src/main.ino index 7f5ee99..c5fdc13 100644 --- a/src/main.ino +++ b/src/main.ino @@ -177,8 +177,8 @@ void setup() // set up IMU ws.imu.initialize(); - ws.imu.setFullScaleAccelRange(MPU6050_ACCEL_FS_8); - ws.imu.setFullScaleGyroRange(MPU6050_GYRO_FS_250); + ws.imu.setFullScaleAccelRange(MPU6050_ACCEL_FS_8); // WARNING: changing this will require changing LSB_LINEAR mission constant + ws.imu.setFullScaleGyroRange(MPU6050_GYRO_FS_250); // WARNING: changing this will require changing LSB_ANGULAR mission constant ws.imu.CalibrateAccel(30); // TODO: What is "30"? Can this be made a mission constant? ws.imu.CalibrateGyro(30); // TODO: What is "30"? Can this be made a mission constant? @@ -208,7 +208,7 @@ void setup() ws.Ka << 0.34641, 1.72254, 0.32694, 0, 0, 0, 0, 0, 0, 0.34641, -1.88376, -0.3991; ws.uLast[0] = 0; ws.uLast[1] = 0; - + ws.calibrate_time = micros(); } diff --git a/src/mission_constants.hh b/src/mission_constants.hh index ec74153..6fe4ddc 100644 --- a/src/mission_constants.hh +++ b/src/mission_constants.hh @@ -49,13 +49,15 @@ float buffCountDown; //***************************************************************************** /* LSB value for linear acceleration measurements. * See MPU6050::getAcceleration docstring for options. - * Current setting is a full-scale range of +/- 8 gee. + * Current setting is a full-scale range of +/- 8 gee, + * in main::setup, in call to setFullScaleAccelRange. */ const float LSB_LINEAR = 2048.0; // (milli-gee/count) note documentation gives incorrectly inverted units /* LSB value for angular velocity measurements. * See MPU6050::getRotation docstring for options. - * Current setting is a full-scale range of +/-m 250 deg/s. + * Current setting is a full-scale range of +/-m 250 deg/s, + * in main::setup, in call to setFullScaleGyroRange. */ const float LSB_ANGULAR = 131.0; // (deg/s/count) note documentation gives incorrectly inverted units