Skip to content

Commit

Permalink
update warning comments re. changing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
mdb15106 committed Nov 11, 2020
1 parent 7ebcf2f commit b04c40c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down Expand Up @@ -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();
}

Expand Down
6 changes: 4 additions & 2 deletions src/mission_constants.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b04c40c

Please sign in to comment.