Text this: Design of Pitch Limit Detection Algorithm for Submarine