Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use barometer data for altitude hold #97

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #89

Implement the use of barometer data for altitude/height hold.

  • Process Barometer Measurements

    • Implement the processBarometerMeasurements function in sensors_mpu6050_hm5883L_ms5611.c to process barometer data from the MS5611 sensor.
    • Update the sensorsSetupSlaveRead function to configure the MS5611 sensor for reading pressure and temperature data.
    • Update the sensorsTask function to call processBarometerMeasurements when barometer data is available.
  • Altitude Estimation

    • Update the positionEstimateInternal function in position_estimator_altitude.c to incorporate barometer data for altitude estimation.
    • Add a blending factor baroAlpha for barometer data in the selfState_s structure.
  • Vertical Velocity Update

    • Update the positionUpdateVelocityInternal function in position_estimator_altitude.c to update the vertical velocity using barometer data.
    • Add a blending factor baroAlpha for barometer data in the selfState_s structure.
  • Parameter Addition

    • Add a new parameter baroAlpha to the posEstAlt parameter group in position_estimator_altitude.c.

Related to espressif#89

Implement the use of barometer data for altitude/height hold.

* **Process Barometer Measurements**
  - Implement the `processBarometerMeasurements` function in `sensors_mpu6050_hm5883L_ms5611.c` to process barometer data from the MS5611 sensor.
  - Update the `sensorsSetupSlaveRead` function to configure the MS5611 sensor for reading pressure and temperature data.
  - Update the `sensorsTask` function to call `processBarometerMeasurements` when barometer data is available.

* **Altitude Estimation**
  - Update the `positionEstimateInternal` function in `position_estimator_altitude.c` to incorporate barometer data for altitude estimation.
  - Add a blending factor `baroAlpha` for barometer data in the `selfState_s` structure.

* **Vertical Velocity Update**
  - Update the `positionUpdateVelocityInternal` function in `position_estimator_altitude.c` to update the vertical velocity using barometer data.
  - Add a blending factor `baroAlpha` for barometer data in the `selfState_s` structure.

* **Parameter Addition**
  - Add a new parameter `baroAlpha` to the `posEstAlt` parameter group in `position_estimator_altitude.c`.
@leeebo
Copy link
Collaborator

leeebo commented Dec 2, 2024

Hi @vishwamartur , thanks for your contribution. This changes LGTM! Have you enabled the MS5611 and tested on the real hardware ?

@vishwamartur
Copy link
Author

Thank you! The code has not been tested on real hardware yet. I will validate the code again and provide an update. We can sync up and conduct testing afterward.
@leeebo

@vishwamartur vishwamartur marked this pull request as draft December 2, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants