diff --git a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp index 473a53e031..f3954e32cb 100644 --- a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp @@ -279,9 +279,9 @@ int DfAK8963Wrapper::_publish(struct mag_sensor_data &data) mag_report.timestamp = hrt_absolute_time(); // TODO: remove these (or get the values) - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; math::Vector<3> mag_val(data.field_x_ga, data.field_y_ga, data.field_z_ga); diff --git a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp index f4f2b72980..044f8d7f10 100644 --- a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp +++ b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp @@ -278,9 +278,9 @@ int DfHmc9250Wrapper::_publish(struct mag_sensor_data &data) data.field_y_ga = tmp; // TODO: remove these (or get the values) - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; math::Vector<3> mag_val(data.field_x_ga, data.field_y_ga, diff --git a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp index 490423f976..fce59a6714 100644 --- a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp +++ b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp @@ -640,18 +640,18 @@ int DfLsm9ds1Wrapper::_publish(struct imu_sensor_data &data) } // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; if (_mag_enabled) { - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; } math::Vector<3> gyro_val_filt; diff --git a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp index 08fcb50217..0c1660e136 100644 --- a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp @@ -501,13 +501,13 @@ int DfMPU6050Wrapper::_publish(struct imu_sensor_data &data) accel_report.device_id = m_id.dev_id; // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; math::Vector<3> gyro_val_filt; math::Vector<3> accel_val_filt; diff --git a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp index 427633470a..743be5ff23 100644 --- a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp @@ -661,18 +661,18 @@ int DfMpu9250Wrapper::_publish(struct imu_sensor_data &data) } // TODO: remove these (or get the values) - gyro_report.x_raw = NAN; - gyro_report.y_raw = NAN; - gyro_report.z_raw = NAN; + gyro_report.x_raw = 0; + gyro_report.y_raw = 0; + gyro_report.z_raw = 0; - accel_report.x_raw = NAN; - accel_report.y_raw = NAN; - accel_report.z_raw = NAN; + accel_report.x_raw = 0; + accel_report.y_raw = 0; + accel_report.z_raw = 0; if (_mag_enabled) { - mag_report.x_raw = NAN; - mag_report.y_raw = NAN; - mag_report.z_raw = NAN; + mag_report.x_raw = 0; + mag_report.y_raw = 0; + mag_report.z_raw = 0; } math::Vector<3> gyro_val_filt;