What about a radiometric hall effect type sensor/s placed on the inside hull and a magnetic steel wire (guitar string?) running perpendicular on the outside - equipped with a small hydro-resistive plane on the loose end? As the speed of the ship increases, current moves the wire and the hall sensor/s record the reduced/ increase field strength. I think that adjusting the sensitivity is as easy as adjusting the length and wire diameter of the sensor and the placement of the sensor along the length. It might take two sensors - one forward, one reverse.

I also think a small tab hanging below the hull on a hinged fitting... an angle sensor measures the deflection as the sub moves through the water. May be oriented horizontally or vertically, using a spring. Forward is positive angles, reverse is negative...

The ultrasonic holds promise - if the resistance of the external mechanism is not an issue. I imagine either one transmitter mounted flush amidships - a triangular reflector splitting the ping to receivers mounted fore and aft, or a more traditional setup with transmitter and receiver on both ends. Could temperature be eliminated as a factor by calibrating an offset at zero speed? Pressure remains a factor I think, but didn't I read that is currently measured?