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

Adjust baro data cal to just report raw sensor data #435

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

avtoku
Copy link
Contributor

@avtoku avtoku commented Sep 25, 2024

Barometers these days are very accurate, so bias offset calibration is now taken to be the pressure altitude at startup.
Raw baro pressure and 'raw' pressure altitude are reported in the telemetry packets.

}
baro_calibration_mean_ = 0.0f;
baro_calibration_var_ = 0.0f;
baro_calibration_count_ = 0;
} else if (baro_calibration_count_ > SENSOR_CAL_DELAY_CYCLES) {
float measurement = data_.baro_pressure - ground_pressure_;
float measurement = data_.baro_pressure;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't use the ground pressure, is there a reason to even run the ground pressure calibration? Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bias (ground pressure) is computed to provide a ground altitude/pressure reference for cases where other references are not available. It is accessible to the companion computer by reading the PARAM_BARO_BIAS register. For convenience the standard atmosphere model is used to also compute the PARAM_GROUND_LEVEL parameter.

@iandareid iandareid merged commit 02c8779 into main Oct 7, 2024
2 checks passed
@iandareid iandareid deleted the ptt/barocal branch October 7, 2024 21:27
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