Ping 1D Profile Data Understanding

Hi @Bartosz, welcome to the forum :slight_smile:

I have edited your post to include some code blocks so itā€™s more readable. You can learn how to do that in the How to Use the Blue Robotics Forums post.

As per the ping protocol docs, the profile data is

There is no ā€œconfidenceā€ for those values, because they are the samples from the transducer, measuring the sound intensities over time in response to a single ping. In Ping Viewer, one profile corresponds to one vertical line.

Each profile also has a distance estimate, which is calculated by the sensor firmware from the data in that profile and the measurements that came before it. It also includes a measure of confidence, which is how sure the sensor is that its ā€œdistanceā€ estimate is correct. You can access those values with myMessage['distance'] and myMessage['confidence'].

If you only want the distance estimate and confidence (and donā€™t need the profile data), you can use the myPing.get_distance() function instead of myPing.get_profile(), as in our example. The profile data is only useful if you want to do your own processing of it, for example to try to calculate your own alternative distance estimates, or maybe to try to estimate material types or surface shapes or something.