Modules for sonar processing, 3D map building and element detection