removed non-existent gyro accuracy data (wow why didn't I write these
tests earlier)
This commit is contained in:
parent
24c6d7ba03
commit
ce55fc27df
|
|
@ -151,20 +151,18 @@ class BNO08x
|
|||
uint16_t get_raw_mems_magf_Y();
|
||||
uint16_t get_raw_mems_magf_Z();
|
||||
|
||||
void get_calibrated_gyro_velocity(float& x, float& y, float& z, BNO08xAccuracy& accuracy);
|
||||
void get_calibrated_gyro_velocity(float& x, float& y, float& z);
|
||||
float get_calibrated_gyro_velocity_X();
|
||||
float get_calibrated_gyro_velocity_Y();
|
||||
float get_calibrated_gyro_velocity_Z();
|
||||
BNO08xAccuracy get_calibrated_gyro_accuracy();
|
||||
|
||||
void get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float& bx, float& by, float& bz, BNO08xAccuracy& accuracy);
|
||||
void get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float& bx, float& by, float& bz);
|
||||
float get_uncalibrated_gyro_velocity_X();
|
||||
float get_uncalibrated_gyro_velocity_Y();
|
||||
float get_uncalibrated_gyro_velocity_Z();
|
||||
float get_uncalibrated_gyro_bias_X();
|
||||
float get_uncalibrated_gyro_bias_Y();
|
||||
float get_uncalibrated_gyro_bias_Z();
|
||||
BNO08xAccuracy get_uncalibrated_gyro_accuracy();
|
||||
|
||||
void get_integrated_gyro_velocity(float& x, float& y, float& z);
|
||||
float get_integrated_gyro_velocity_X();
|
||||
|
|
@ -389,15 +387,15 @@ class BNO08x
|
|||
accel_accuracy; ///<Raw acceleration readings (See SH-2 Ref. Manual 6.5.8)
|
||||
uint16_t raw_lin_accel_X, raw_lin_accel_Y, raw_lin_accel_Z,
|
||||
accel_lin_accuracy; ///<Raw linear acceleration (See SH-2 Ref. Manual 6.5.10)
|
||||
uint16_t raw_calib_gyro_X, raw_calib_gyro_Y, raw_calib_gyro_Z, calib_gyro_accuracy; ///<Raw gyro reading (See SH-2 Ref. Manual 6.5.13)
|
||||
uint16_t raw_calib_gyro_X, raw_calib_gyro_Y, raw_calib_gyro_Z; ///<Raw gyro reading (See SH-2 Ref. Manual 6.5.13)
|
||||
uint16_t raw_quat_I, raw_quat_J, raw_quat_K, raw_quat_real, raw_quat_radian_accuracy,
|
||||
quat_accuracy; ///<Raw quaternion reading (See SH-2 Ref. Manual 6.5.44)
|
||||
uint16_t integrated_gyro_velocity_X, integrated_gyro_velocity_Y,
|
||||
integrated_gyro_velocity_Z; ///<Raw gyro angular velocity reading from integrated gyro rotation vector (See SH-2 Ref. Manual 6.5.44)
|
||||
uint16_t gravity_X, gravity_Y, gravity_Z,
|
||||
gravity_accuracy; ///<Gravity reading in m/s^2 (See SH-2 Ref. Manual 6.5.11)
|
||||
uint16_t raw_uncalib_gyro_X, raw_uncalib_gyro_Y, raw_uncalib_gyro_Z, raw_bias_X, raw_bias_Y, raw_bias_Z,
|
||||
uncalib_gyro_accuracy; ///<Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14)
|
||||
uint16_t raw_uncalib_gyro_X, raw_uncalib_gyro_Y, raw_uncalib_gyro_Z, raw_bias_X, raw_bias_Y,
|
||||
raw_bias_Z; ///<Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14)
|
||||
uint16_t raw_magf_X, raw_magf_Y, raw_magf_Z,
|
||||
magf_accuracy; ///<Calibrated magnetic field reading in uTesla (See SH-2 Ref. Manual 6.5.16)
|
||||
uint8_t tap_detector; ///<Tap detector reading (See SH-2 Ref. Manual 6.5.27)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ class BNO08xTestHelper
|
|||
float calib_gyro_vel_x;
|
||||
float calib_gyro_vel_y;
|
||||
float calib_gyro_vel_z;
|
||||
BNO08xAccuracy calib_gyro_accuracy;
|
||||
|
||||
float uncalib_gyro_vel_x;
|
||||
float uncalib_gyro_vel_y;
|
||||
|
|
@ -53,7 +52,6 @@ class BNO08xTestHelper
|
|||
float uncalib_gyro_drift_x;
|
||||
float uncalib_gyro_drift_y;
|
||||
float uncalib_gyro_drift_z;
|
||||
BNO08xAccuracy uncalib_gyro_accuracy;
|
||||
|
||||
float magf_x;
|
||||
float magf_y;
|
||||
|
|
@ -219,9 +217,6 @@ class BNO08xTestHelper
|
|||
if (report_data->uncalib_gyro_drift_z != 0.0f)
|
||||
new_data = true;
|
||||
|
||||
if (report_data->uncalib_gyro_accuracy != BNO08xAccuracy::UNDEFINED)
|
||||
new_data = true;
|
||||
|
||||
return new_data;
|
||||
}
|
||||
|
||||
|
|
@ -238,9 +233,6 @@ class BNO08xTestHelper
|
|||
if (report_data->calib_gyro_vel_z != 0.0f)
|
||||
new_data = true;
|
||||
|
||||
if (report_data->calib_gyro_accuracy != BNO08xAccuracy::UNDEFINED)
|
||||
new_data = true;
|
||||
|
||||
return new_data;
|
||||
}
|
||||
|
||||
|
|
@ -331,10 +323,9 @@ class BNO08xTestHelper
|
|||
imu->get_linear_accel(report_data->lin_accel_x, report_data->lin_accel_y, report_data->lin_accel_z, report_data->lin_accel_accuracy);
|
||||
imu->get_gravity(report_data->grav_x, report_data->grav_y, report_data->grav_z, report_data->grav_accuracy);
|
||||
imu->get_calibrated_gyro_velocity(
|
||||
report_data->calib_gyro_vel_x, report_data->calib_gyro_vel_y, report_data->calib_gyro_vel_z, report_data->calib_gyro_accuracy);
|
||||
report_data->calib_gyro_vel_x, report_data->calib_gyro_vel_y, report_data->calib_gyro_vel_z);
|
||||
imu->get_uncalibrated_gyro_velocity(report_data->uncalib_gyro_vel_x, report_data->uncalib_gyro_vel_y, report_data->uncalib_gyro_vel_z,
|
||||
report_data->uncalib_gyro_drift_x, report_data->uncalib_gyro_drift_y, report_data->uncalib_gyro_drift_z,
|
||||
report_data->uncalib_gyro_accuracy);
|
||||
report_data->uncalib_gyro_drift_x, report_data->uncalib_gyro_drift_y, report_data->uncalib_gyro_drift_z);
|
||||
imu->get_magf(report_data->magf_x, report_data->magf_y, report_data->magf_z, report_data->magf_accuracy);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1718,7 +1718,6 @@ void BNO08x::update_lin_accelerometer_data(uint16_t* data, uint8_t status)
|
|||
*/
|
||||
void BNO08x::update_calibrated_gyro_data(uint16_t* data, uint8_t status)
|
||||
{
|
||||
calib_gyro_accuracy = status;
|
||||
raw_calib_gyro_X = data[0];
|
||||
raw_calib_gyro_Y = data[1];
|
||||
raw_calib_gyro_Z = data[2];
|
||||
|
|
@ -1734,7 +1733,6 @@ void BNO08x::update_calibrated_gyro_data(uint16_t* data, uint8_t status)
|
|||
*/
|
||||
void BNO08x::update_uncalibrated_gyro_data(uint16_t* data, uint8_t status)
|
||||
{
|
||||
uncalib_gyro_accuracy = status;
|
||||
raw_uncalib_gyro_X = data[0];
|
||||
raw_uncalib_gyro_Y = data[1];
|
||||
raw_uncalib_gyro_Z = data[2];
|
||||
|
|
@ -2395,7 +2393,6 @@ void BNO08x::reset_all_data()
|
|||
raw_calib_gyro_X = 0U;
|
||||
raw_calib_gyro_Y = 0U;
|
||||
raw_calib_gyro_Z = 0U;
|
||||
calib_gyro_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
|
||||
|
||||
// reset quaternion to nan
|
||||
raw_quat_I = 0U;
|
||||
|
|
@ -2420,7 +2417,6 @@ void BNO08x::reset_all_data()
|
|||
raw_bias_X = 0U;
|
||||
raw_bias_Y = 0U;
|
||||
raw_bias_Z = 0U;
|
||||
uncalib_gyro_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
|
||||
|
||||
raw_magf_X = 0U;
|
||||
raw_magf_Y = 0U;
|
||||
|
|
@ -3024,16 +3020,14 @@ uint16_t BNO08x::get_raw_mems_magf_Z()
|
|||
* @param x Reference variable to save X axis angular velocity
|
||||
* @param y Reference variable to save Y axis angular velocity
|
||||
* @param z Reference variable to save Z axis angular velocity
|
||||
* @param accuracy Reference variable to save reported gyro accuracy.
|
||||
*
|
||||
* @return void, nothing to return
|
||||
*/
|
||||
void BNO08x::get_calibrated_gyro_velocity(float& x, float& y, float& z, BNO08xAccuracy& accuracy)
|
||||
void BNO08x::get_calibrated_gyro_velocity(float& x, float& y, float& z)
|
||||
{
|
||||
x = q_to_float(raw_calib_gyro_X, GYRO_Q1);
|
||||
y = q_to_float(raw_calib_gyro_Y, GYRO_Q1);
|
||||
z = q_to_float(raw_calib_gyro_Z, GYRO_Q1);
|
||||
accuracy = static_cast<BNO08xAccuracy>(calib_gyro_accuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3066,16 +3060,6 @@ float BNO08x::get_calibrated_gyro_velocity_Z()
|
|||
return q_to_float(raw_calib_gyro_Z, GYRO_Q1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get calibrated gyro accuracy.
|
||||
*
|
||||
* @return Accuracy of calibrated gyro.
|
||||
*/
|
||||
BNO08xAccuracy BNO08x::get_calibrated_gyro_accuracy()
|
||||
{
|
||||
return static_cast<BNO08xAccuracy>(calib_gyro_accuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get full rotational velocity without drift compensation (units in Rad/s). An estimate of drift is given but
|
||||
* not applied.
|
||||
|
|
@ -3086,11 +3070,10 @@ BNO08xAccuracy BNO08x::get_calibrated_gyro_accuracy()
|
|||
* @param b_x Reference variable to save X axis drift estimate
|
||||
* @param b_y Reference variable to save Y axis drift estimate
|
||||
* @param b_z Reference variable to save Z axis drift estimate
|
||||
* @param accuracy Reference variable to save reported gyro accuracy.
|
||||
*
|
||||
* @return void, nothing to return
|
||||
*/
|
||||
void BNO08x::get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float& b_x, float& b_y, float& b_z, BNO08xAccuracy& accuracy)
|
||||
void BNO08x::get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float& b_x, float& b_y, float& b_z)
|
||||
{
|
||||
x = q_to_float(raw_uncalib_gyro_X, GYRO_Q1);
|
||||
y = q_to_float(raw_uncalib_gyro_Y, GYRO_Q1);
|
||||
|
|
@ -3098,7 +3081,6 @@ void BNO08x::get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float&
|
|||
b_x = q_to_float(raw_bias_X, GYRO_Q1);
|
||||
b_y = q_to_float(raw_bias_Y, GYRO_Q1);
|
||||
b_z = q_to_float(raw_bias_Z, GYRO_Q1);
|
||||
accuracy = static_cast<BNO08xAccuracy>(uncalib_gyro_accuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3161,16 +3143,6 @@ float BNO08x::get_uncalibrated_gyro_bias_Z()
|
|||
return q_to_float(raw_bias_Z, GYRO_Q1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get uncalibrated gyro accuracy.
|
||||
*
|
||||
* @return Accuracy of uncalibrated gyro.
|
||||
*/
|
||||
BNO08xAccuracy BNO08x::get_uncalibrated_gyro_accuracy()
|
||||
{
|
||||
return static_cast<BNO08xAccuracy>(uncalib_gyro_accuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Full rotational velocity from gyro-integrated rotation vector (See Ref. Manual 6.5.44)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -443,10 +443,9 @@ TEST_CASE("Enable/Disable Uncalibrated Gyro", "[SingleReportEnableDisable]")
|
|||
|
||||
sprintf(msg_buff,
|
||||
"Enabled Report Rx Data Trial %d Success: Uncalib Gyro: vX: %.2lf vY: %.2lf vZ: %.2lf driftX: %.2lf driftY: %.2lf driftZ: "
|
||||
"%.2lf Accuracy: %s",
|
||||
"%.2lf",
|
||||
(i + 1), report_data.uncalib_gyro_vel_x, report_data.uncalib_gyro_vel_y, report_data.uncalib_gyro_vel_z,
|
||||
report_data.uncalib_gyro_drift_x, report_data.uncalib_gyro_drift_y, report_data.uncalib_gyro_drift_z,
|
||||
BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.uncalib_gyro_accuracy));
|
||||
report_data.uncalib_gyro_drift_x, report_data.uncalib_gyro_drift_y, report_data.uncalib_gyro_drift_z);
|
||||
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
|
|
@ -525,9 +524,8 @@ TEST_CASE("Enable/Disable Calibrated Gyro", "[SingleReportEnableDisable]")
|
|||
|
||||
sprintf(msg_buff,
|
||||
"Enabled Report Rx Data Trial %d Success: Calibrated Gyro: vX: %.2lf vY: %.2lf vZ: "
|
||||
"%.2lf Accuracy: %s",
|
||||
(i + 1), report_data.calib_gyro_vel_x, report_data.calib_gyro_vel_y, report_data.calib_gyro_vel_z,
|
||||
BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.calib_gyro_accuracy));
|
||||
"%.2lf",
|
||||
(i + 1), report_data.calib_gyro_vel_x, report_data.calib_gyro_vel_y, report_data.calib_gyro_vel_z);
|
||||
BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);
|
||||
|
||||
// reset all data used in report test
|
||||
|
|
|
|||
Loading…
Reference in New Issue