In this paper, the authors make use of sonar transducers to detect the corner of two orthogonal panels and they propose a strategy for accurately reconstructing the surfaces. In order to point a linear array of four sensors at the desired position, the motion of a digital motor is appropriately controlled. When the sensors are directed towards the intersection between the planes, longer times of flight are observed because of multiple reflections. All the concerned distances have to be excluded and that is why an indicator based on the output signal energy is introduced. A clustering technique allows for the partitioning of the dataset in three clusters and the indicator selects the subset containing misrepresented information. The remaining distances are corrected so as to take into consideration the directivity and they permit the plotting of two sets of points in a three-dimensional space. In order to leave out the outliers, each set is filtered by means of a confidence ellipsoid which is defined by the Principal Component Analysis (PCA). The best-fit planes are obtained based on the principal directions and the variances. Experimental tests and results are shown demonstrating the effectiveness of this new approach.