simulation code for towedarray project