Skip to content

Commit 2bbdef2

Browse files
committed
sensors/vehicle_angular_velocity: don't remove bias twice
1 parent ec2cd3b commit 2bbdef2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/modules/sensors/vehicle_angular_velocity/VehicleAngularVelocity.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,7 @@ void VehicleAngularVelocity::Run()
257257
const Vector3f val{sensor_data.x, sensor_data.y, sensor_data.z};
258258

259259
// correct for in-run bias errors
260-
Vector3f angular_velocity_raw = _corrections.Correct(val) - _bias;
261-
262-
// correct for in-run bias errors
263-
angular_velocity_raw -= _bias;
260+
const Vector3f angular_velocity_raw = _corrections.Correct(val) - _bias;
264261

265262
// Differentiate angular velocity (after notch filter)
266263
const Vector3f angular_velocity_notched{_notch_filter_velocity.apply(angular_velocity_raw)};

0 commit comments

Comments
 (0)