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

Airspeed Calibration not working on Pixhawk 5X VTOL Firmware #19088

Open
poyatabrizi opened this issue Jan 27, 2022 · 15 comments
Open

Airspeed Calibration not working on Pixhawk 5X VTOL Firmware #19088

poyatabrizi opened this issue Jan 27, 2022 · 15 comments

Comments

@poyatabrizi
Copy link

poyatabrizi commented Jan 27, 2022

Issue Details
When performing a calibration, the process just goes through without me having to blow into the pitot
After above-mentioned calibration, the speed with no wind reads at ~9m/s or ~30km/h
I have tested Ardupilot firmware and my standby airspeed reads around ~2m/s.

To Reproduce
-Connect the 45250 airspeed sensor via I2C
-Navigate to sensors and airspeed
-After sensor calibration, reboot
-Check airspeed value on the main screen

Expected behaviour
I expect the calibration will take into account the offset of the sensor and result in close to 0 airspeeds when there are no wind (i.e. indoor)

Log Files and Screenshots
Refer to forum chat where multiple people are experiencing this and there are screenshots provided.
https://discuss.px4.io/t/airspeed-sensor-is-off-by-9m-s-or-30km-h/25901

Drone (please complete the following information):
Pixhawk 5X flight controller
VTOL - Generic Quadplane VTOL
45250 5A1 airspeed sensor
Qground Stable Version 4.0
PX4 Firmware: Standard VTOL (Generic Quadplane) Firmware 1.12.3

Additional context
Add any other context about the problem here.

@gruffymax
Copy link

gruffymax commented Jan 29, 2022

It looks as though the calibration is working as SENS_DPRES_OFF is set to the zero differential pressure value sent from the sensor. In my case the 4525 sensor reports 145 pa at rest and my SENS_DPRES_OFF is also set to 145.
It seems as though this offset value is not being subtracted from the raw differential pressure before being used to calculate the airspeed. Manually changing SENS_DPRES_OFF to any value makes no difference to the airspeed displayed in QGroundControl.

@gruffymax
Copy link

Looking through the driver for the MS4525 shows that a differential pressure is subtracted from the raw pressure in drivers/differential_pressure/ms4525/ms4525_airspeed.cpp:215
report.differential_pressure_filtered_pa = _filter.apply(diff_press_pa_raw) - _diff_pres_offset;

Tracing _diff_pres_offset back leads to the function Airspeed::ioctl, lib/drivers/airspeed/airspeed.cpp:114 which sets _diff_pres_offset. This function does not appear to be called anywhere so _diff_pres_offset stays as 0.0f.

@ryanjAA
Copy link
Contributor

ryanjAA commented Jan 30, 2022

Which version of px4 are you running. I’ll give this a try tomorrow.

@poyatabrizi
Copy link
Author

Sorry, I forgot to mention the Firmware details. it is now added to my original comment and it is v 1.12.3

@vincentpoont2
Copy link
Contributor

vincentpoont2 commented Feb 10, 2022

Sorry, I forgot to mention the Firmware details. it is now added to my original comment and it is v 1.12.3

I just reproduced it, it seems like it is only happening with v1.12.3 and not with Master firmware. Can you use try using Dev build (master)? @bkueng @dagar Was there something that was change recently related to this?

1.12.3
https://user-images.githubusercontent.com/46874772/153453307-5b7527b4-2c97-41f3-add6-a69098815077.mp4

Master FMuv5x Firmware
https://user-images.githubusercontent.com/46874772/153453635-55c37c05-9603-45be-9d59-18fa2a458546.mp4

@dagar dagar self-assigned this Feb 10, 2022
@dagar dagar added the bug label Feb 10, 2022
@jhoexp
Copy link

jhoexp commented Mar 1, 2022

Same problem here, Holybro 5x, 4525 airspeed sensor, 1.12.3, vtol standard quadplane airframe: calibration does not complete correctly (the process concludes without letting you blow into the pitot). The result is that aispeed reads large offset from 0, even when there is no wind indoor and the vehicle is standing perfectly still.

@SJ-Jang
Copy link

SJ-Jang commented Jul 22, 2022

I am currently having the same problem.
Do we have a modified version?

@VTOLDavid
Copy link
Contributor

Same problem here with Cube orange, Px4 1.14 beta and Sensirion sdp33

@junwoo091400
Copy link
Contributor

Tracing _diff_pres_offset back leads to the function Airspeed::ioctl, lib/drivers/airspeed/airspeed.cpp:114 which sets _diff_pres_offset. This function does not appear to be called anywhere so _diff_pres_offset stays as 0.0f.

I have just checked and this is correct. The offset variable isn't getting properly updated in v1.12.3.

However, for v1.14 beta this should have been resolved, as the offset is now decoupled from the airspeed sensor driver, and is taken into account inside airspeed calibration code alone.

#if defined(CONFIG_SENSORS_VEHICLE_AIRSPEED)
/* Differential pressure offset */
_parameter_handles.diff_pres_offset_pa = param_find("SENS_DPRES_OFF");

@VTOLDavid Did you indeed experience the problem of Airspeed calibration skipping the step of "blow into the pitot tube" on it's own using v1.14 beta?

@junwoo091400
Copy link
Contributor

Also, this should have been fixed starting on v1.13, from this commit: d1d15a6

For now I don't know if it would be valuable to backport and fix this bug in v1.12 🤷

@junwoo091400
Copy link
Contributor

However, for v1.14 beta this should have been resolved, as the offset is now decoupled from the airspeed sensor driver, and is taken into account inside airspeed calibration code alone.

@VTOLDavid @SPuigUAVW could you check again whether this problem is indeed present in v1.14? It should not be here, but I don't have the setup to confirm that 😢

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-july-11-2023/33057/1

@VTOLDavid
Copy link
Contributor

VTOLDavid commented Jul 11, 2023

We installed v1.14 last week. We had different problems with pitot calibration and USB connection:

  • USB connection for cube orange does not work in latest QGC 4.2.6. Once flashed in last QGC version it disconnected. Only connected via USB in a older version of QGC 4.2.4.
  • With this older version we configured a datalink.
  • With QGC 4.2.6 over a telemetry link pressing pitot calibration shows nothing. The second time shows the error Command denied during calibration: 241
  • With QGC 4.2.4 over a telemetry link we were able to calibrate the pitot normally.

Sems that the USB driver problem with cubeorange is interfering here, something changed in QGC and we had some random problems...

@junwoo091400
Copy link
Contributor

@ryanjAA provided this log of an Airspeed calibration working fine with the latest release/1.14 branch, using the same SDP33 sensor: https://review.px4.io/plot_app?log=079cea16-699f-47c8-93b6-9639f5d57d00, and as you reported, the problem seems to be in QGC.

Could you create another issue on QGC repo and tag me there? @VTOLDavid

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-july-18-2023/33189/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants