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

Multiple airspeed sensors support #12237

Open
AuterionWrikeBot opened this issue Jun 11, 2019 · 13 comments
Open

Multiple airspeed sensors support #12237

AuterionWrikeBot opened this issue Jun 11, 2019 · 13 comments

Comments

@AuterionWrikeBot
Copy link

AuterionWrikeBot commented Jun 11, 2019

Now that we have the new airspeed validation and selection module, we should next push towards enabling multiple airspeed sensors on a driver level and then test the airspeed module with multiple sensors.

□ enable multiple airspeed sensors in driver
□ define/ implement calibration procedure with multiple sensors
□ simulate different airspeed failures (clogging, water, ..) and test detection and switching in airspeed validation and selection module

@dagar dagar added this to the Release v1.10.0 milestone Jun 13, 2019
@sfuhrer sfuhrer changed the title Air data module extension to multiple sensors Multiple airspeed sensors support Aug 9, 2019
@sfuhrer sfuhrer self-assigned this Aug 9, 2019
@sfuhrer sfuhrer removed this from the Release v1.10.0 milestone Nov 9, 2019
@stale
Copy link

stale bot commented Feb 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Feb 7, 2020
@sfuhrer sfuhrer removed their assignment Feb 7, 2020
@stale stale bot removed the stale label Feb 7, 2020
@hamishwillee
Copy link
Contributor

@RomanBapst So is this something we will still want? It was you originally, then @sfuhrer. Good to assign or close.

@RomanBapst
Copy link
Contributor

@hamishwillee This is not done yet. Wen can already use 2 airspeed sensors but we are not there yet in terms of calibration. What we've done so far is that we used a sensirion airspeed sensor as the second sensor, because it does not require any calibration.
I think @dagar is really the man who has been doing most progress in this direction with all this sensor pipeline refactoring.

@hamishwillee
Copy link
Contributor

That's cool @RomanBapst . My point was really that if this has no assignee, then what is likely to happen is it will go stale and get dropped. If that is going to happen anyway, let's just delete it now.

So I have assigned to @dagar and you guys can do with it as you will.

@stale
Copy link

stale bot commented May 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label May 10, 2020
@bresch bresch assigned sfuhrer and unassigned dagar May 11, 2020
@stale stale bot removed the stale label May 11, 2020
@stale
Copy link

stale bot commented Aug 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Aug 9, 2020
@bresch bresch removed the stale label Aug 10, 2020
@benedek97
Copy link

@hamishwillee This is not done yet. Wen can already use 2 airspeed sensors but we are not there yet in terms of calibration.

Is this feature of using two airspeed sensors included in the current master version? Or it will be just along with the calibration feature?
I connected two airspeed sensors (ms4525 pitot tube sensors) via i2c, and only one is visible. I have checked the number_of_airspeed_sensors variable in the Firmware, and it is always one. Also in the logfile there is only one airspeed sensor logged. MAX_NUM_AIRSPEED_SENSORS is set to 3. Should it work with no setup or I need to set something in the code/parameters to see the second sensor?

Thanks for any help.

@hamishwillee
Copy link
Contributor

@Safranek42 Unlikely this has been updated. @sfuhrer can you provide any update?

@saengphet
Copy link

I have tested this feature by connecting 2 airspeed sensors with different brand "SDP33" and "ms4525". Only SDP33 was found as primary airspeed. I investigated more and found that only 1 differential_pressure from SDP33 pass on to airspeed module to calculate indicated airspeed and more. I tried to modified code in sensors.cpp to make it works.

However, due to the concept of measuring the pressure of "SDP33" and "ms4525" is completely different, then offset pressure from these 2 is too much difference too, I could not make it works perfectly (sometimes, SDP33 is primary but not always).
The important thing is Qgroundcontrol does not support 2 airspeed sensors calibration and offset pressure has only 1, not 2.

For the same airspeed sensor brand such as "ms4525", I could not find a multi-instance to call them at the same time (might be due to there is the same i2c address??).

@mlaiacker
Copy link
Contributor

Hi,
I just also got a similar problem in v1.11 and I am questioning the airspeed_selector module idea.
It compares airspeed but there is only one instance that publish airspeed topic in "sensors.cpp" (search for "ORB_ID(airspeed)")
You can have multiple differential pressure sensors but the "sensors.cpp" only looks at one "ORB_ID(differential_pressure)" and doesn't convert all "ORB_ID(differential_pressure)" to "ORB_ID(airspeed)". Why??
This makes no sens at all.

Also I always have a differential_pressure instance from the analog "ADC_AIRSPEED_VOLTAGE_CHANNEL" even if the "diff_pres_analog_scale" is set to zero. I have to remove the "ADC_AIRSPEED_VOLTAGE_CHANNEL" from the board_config.h to make a sdp3x work. Otherwise I get the temperature from the sdp3x in the airspeed topic but no airspeed.
Makes no sens at all.

image

Any ideas?

@dagar
Copy link
Member

dagar commented Oct 2, 2020

@mlaiacker it's in flux at the moment, but if you're interested in full support and can help test I think we could get this done properly. In #15853 I'm refactoring the airspeed portion of sensors so that it either selects the highest priority differential pressure to publish a single airspeed, or you can optionally have it publish an airspeed for each differential pressure.

The analog airspeed publishing is clearly a bug. If you open a new issue and share a log I'll take a closer look.

@mlaiacker
Copy link
Contributor

@dagar
Thank you for the explanation. I was confused how the airspeed_selector should work. It looks like i was right that it is not finished. That's ok.

The analog sensor thing:

Looks like a bug I introduced myself by some changes I made to the Firmware. I tested the original v1.11 and it worked fine.
Sorry about that.
I had to introduce a gain/scaling factor on the differential pressure level to compensate for not optimal pitot tube placement on the airframe and somehow the gain was zero. I don't know how, but that my job to find out.

Maybe this scale factor for the diff pressure could be added to PX4?

@dagar
Copy link
Member

dagar commented Oct 2, 2020

Maybe this scale factor for the diff pressure could be added to PX4?

I'm going to expand the differential pressure calibration to be more like accel/gyro/mag where it's per device id. We can add a scale factor as well.

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

9 participants