Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Apply Advanced Filtering #243 #277

Closed
wants to merge 1 commit into from

Conversation

rohandhiman03
Copy link
Collaborator

Implement Moving Average Filter in BarometerInternal

Thanks for your contribution.

Describe the pull request
Implement Moving Average Filter in BarometerInternal

This commit introduces a moving average filter to the BarometerInternal class to smooth out the barometric pressure readings. It helps in reducing the impact of transient fluctuations and outliers in the sensor data, leading to more accurate altitude calculations.

  • Added a queue to store a fixed number of recent pressure readings.
  • Modified onSensorChanged method to calculate the average of the readings in the queue.
  • The averaged pressure value is now used for further processing instead of the raw sensor value.

This change aims to enhance the reliability of altitude measurements, especially in conditions where barometric pressure is prone to rapid changes or anomalies.

Link to the the issue
#243

License agreement
By opening this pull request, you are providing your contribution under the Apache License 2.0 (see LICENSE.md).

Note: new dependencies/libraries
Please refrain from introducing new libraries without consulting the team.

Implement Moving Average Filter in BarometerInternal
@rohandhiman03 rohandhiman03 linked an issue Nov 26, 2023 that may be closed by this pull request
@rohandhiman03 rohandhiman03 added bug Something isn't working Group 10 labels Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Group 10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subtask 5: Apply Advanced Filtering
1 participant