Ping1D confidence meaning

Hi @Jose, welcome to the forum :slight_smile:

The Ping Sonar firmware is closed source, but I assume the confidence is based on a combination of the return strength and consistency over time. If the object/surface being reflected off is bumpy (e.g. a sea floor with lots of coral and seaweed) or small, or the vehicle is moving / rotating quickly then the confidence will be reduced, whereas if the ping responses are strong and steady the confidence will be high.

You can consider the confidence as an estimate of how likely it is that the recent distance measurements correspond to a well-defined object or surface (i.e. is the measured distance likely ‘valid’?). The sonar only measures what’s in front of it, and it has no way of knowing whether a weak return is from a large but only mildly reflective target, or a highly reflective target with a big hole in it or angled away from the sonar, or multiple small objects at a similar distance, etc.

Note that the confidence is more an indicator of measurement precision/consistency than accuracy. Repeated consistent measurements to an object will likely report a high confidence, even if the object is shaped such that the distance estimate is not from the part of the object that is closest to the sonar (e.g. measuring the distance to a wall, rather than to a narrow spike/pole sticking out of it).