A novel sonar array for mobile robots is presented with applications to localization and mapping of indoor environments. The ultrasonic sensor localizes and classifies multiple targets in two dimensions to ranges of up to 8 meters. By accounting for effects of temperature and humidity, the system is accurate to within 1 mm and 0.1 degrees in still air. Targets separated by 10 mm can be discriminated. Targets are classified into planes, corners, edges and unknown, with the minimum of two transmitters and two receivers. A novel approach is that receivers are closely spaced to minimize the correspondence problem of associating echoes from multiple targets. A set of templates is generated for echoes to allow the optimal arrival time to be estimated, and overlapping echoes and disturbances to be rejected.