Simulation of sonar