Using Ping Sonar in QGC - which Distance_Sensor value to choose?


We have a Ping Sonar on our BlueROV. All working fine - BlueOS recognizes it, and we have ‘MAVLink Distances’ switched on, in the hopes of being able to feed the altimeter data in QGroundControl. The unit works just find in Ping Viewer, and altitude values seem correct.

When we try to read this value into QGroundControl, we can only see ‘Max_Distance’ or ‘Min_Distance’ as options, as well as a bunch of ‘RotationPitchXX’ options - which don’t seem like they would be the right choice. However, this post (NMEA Depth sensor display in QGC) seems to suggest we should choose the "RotationPitch270’ value to get our distances into QGC. This seems unintuitive – is this the correct value to choose?

On a slightly related note, can we connect to the the sensor and read the date in QGC and PingViewer at the same time, or only at application at a time?



Hi @bsnow,

Pitching up by 270 degrees is equivalent to pitching down by 90 degrees. The Ping Sonar driver in BlueOS currently assumes that a connected Ping Sonar device is pointing downwards, acting as an altimeter, so that’s how it sends the distance sensor messages to the autopilot.

There are plans to expand the support in future, including allowing the user to select the orientation their device is actually pointing in (e.g. in case they want to use it for lateral obstacle avoidance instead of vertical distance to the sea floor / river/lake bed), but for now it’s just assumed down.

Yes, both should work simultaneously - if the driver is receiving profile requests from Ping Viewer then it just skims the distance values from the sensor’s responses to send to the autopilot (which then passes them on to its control station, like QGC or Cockpit), whereas if there are no messages being sent then the driver requests distances from the sonar so it can send them to the autopilot.

Hi @EliotBR,

Thanks for the explanation, got it working with the Rotation270 parameter from the distance sensor!


1 Like