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

AP_Airspeed: check for baro baro data in SDP3X #18232

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Aug 5, 2021

this matters for SDP3X as AP_Periph sensor with no baro
See https://discuss.ardupilot.org/t/sdp3x-airspeed-sensor-broken-on-canbus/74409

this matters for SDP3X as AP_Periph sensor with no baro
float baro_pressure;
if (baro == nullptr || baro->num_instances() == 0) {
// with no baro assume sea level
baro_pressure = SSL_AIR_PRESSURE;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually a terrible assumption on this airspeed sensor. We are FAR safer to declare the sensor unhealthy and not update in this case. The airspeed can be off by a ridiculous margin with this approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

A slightly better option would be using the temperature, gps altitude, and baro at launch to determine a pressure altitude.

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 reason for this PR is people are using the SDP3xx on AP_Periph nodes that have no other sensors. They were getting NaN as the output. They can't use GPS or baro.
I just ran some tests on a SDP3X with changes to the pressure. I first set it up to be reading 20 m/s at sea level (101325Pa). That required a reading from the sensor of 155.
Then I changed it to 10k feet, with a pressure of 69681. The airspeed changed to 20.9 m/s with the same reading from the sensor.
So with a 10k feet change we have a 0.9 m/s error. I wouldn't call that "terrible"

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not a good solution, they are much much better off not using those on the periph nodes. Unless we've added back the compensation terms that were dropped to make the processing take less time the sensor is off at 8K DA by approximately 3-5 m/s (I can't recall what it was) with a working baro. With a non working baro compounding that I'd hate to see it on an aircraft.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

supporting an existing sensor is vastly better than giving NaN. I will merge

@tridge tridge dismissed WickedShell’s stale review August 9, 2021 21:08

discussed with Michael and on balance decided to merge

@tridge tridge added the WikiNeeded needs wiki update label Aug 9, 2021
@tridge
Copy link
Contributor Author

tridge commented Aug 9, 2021

@Hwurzburg we need to ensure the wiki recommends not using the SDP3x at higher altitudes (say anything over 3k feet pressure altitude ASL) as we believe it will give poor airspeed

@tridge tridge merged commit 3f67917 into ArduPilot:master Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants