Skip to content

Commit

Permalink
sensors/vehicle_angular_velocity: don't remove bias twice
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed May 10, 2020
1 parent ec2cd3b commit 2bbdef2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ void VehicleAngularVelocity::Run()
const Vector3f val{sensor_data.x, sensor_data.y, sensor_data.z};

// correct for in-run bias errors
Vector3f angular_velocity_raw = _corrections.Correct(val) - _bias;

// correct for in-run bias errors
angular_velocity_raw -= _bias;
const Vector3f angular_velocity_raw = _corrections.Correct(val) - _bias;

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

0 comments on commit 2bbdef2

Please sign in to comment.