Integrating a new ultrasonic sensor driver: PGA460

Hello,

I am trying to integrate a new ultrasonic sensor driver I wrote for the PGA460. I have successfully published data to uORB as type “distance_sensor_s::MAV_DISTANCE_SENSOR_ULTRASOUND.” I can see the data in the analyze widget in QGroundControl, and it looks clean. I would like to use this data in the EKF2 to determine the height above ground level.

I have found parameters such as EKF2_RNG_AID, MPC_ALT_MODE, EKF2_HGT_MODE, but I am unsure about how to explicitly enable use of rangefinder data. I am not seeing a parameter for height above ground in the analyze widget… I see hagl_ratio, but it always remains 0 and I see altitude_terrain, which is all FFs.

I am still quite new to PX4, any help would be greatly appreciated!

Can you elaborate on which hardware you are using for the PGA460? Are you using the TI Eval board?

Haha wow 3 years later, crazy how time flies.

see https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/distance_sensor/pga460

Time flies but thanks for the response! I have been looking through the code, but curious what hardware you were using… can you use just a PGA460 eval board like this?:
https://www.digikey.com/en/products/detail/texas-instruments/PGA460PSM-EVM/10434537

It looks like that part is designed to be used with a larger development kit from TI that costs $200+, so I would like to avoid that.

Yes that’s all you technically need, you could plug that into a serial port and use that with the existing driver. But of course there’s a caveat, that driver has the register settings specifically tuned for the transducer we used on our custom PCB. When you buy the expensive kit from TI with the dev board with the mcu you get to use their desktop software to adjust register settings, view raw signal data, and overall have a much easier experience tuning the pga460 to work with your transducer.