The thesis report can be found here
The analog signal output from the sonar should have a 1 nF capacitor to protect from static discharges according to the manufacturer Talon. When I received the sonar, I used a 1 µF capacitor by mistake, that is 1000 times to big.
As a result of this the signal is basically integrated as seen in the picture (The vertical edge "A" should have been one peak and "B" another).
The sonar rings like a bell, and I thought that when the listening was turned on (at "A") it was still outputting sound, and when the first echo comes back it was superimposed on the still ringing sonar (at "B"). (See also Figure 3.3
for how I explained the looks of the signal.)
So I differentiated the signal digitally to find the edges (Figure 3.4
). And the signal became quite usable anyway.
I didn't figure this mistake out until 2 years after the report was handed in.