Skip to content

Commit

Permalink
gyroscope bias estimator removed max operation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlainSchoebi committed Apr 18, 2024
1 parent 672a1b6 commit 6a768d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/sensors/gyroscope_bias_estimator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ bool GyroscopeBiasEstimator::UpdateGyroscopeBias(
return false;
}

float update_weight = std::max(
0.0f, 1.0f - gyroscope_sample_norm2 / kGyroscopeForBiasThreshold);
float update_weight =
1.0f - gyroscope_sample_norm2 / kGyroscopeForBiasThreshold;
update_weight *= update_weight;
gyroscope_bias_lowpass_filter_.AddWeightedSample(
gyroscope_lowpass_filter_.GetFilteredData(), timestamp_ns, update_weight);
Expand Down

0 comments on commit 6a768d7

Please sign in to comment.