Similar Items: Design of Pitch Limit Detection Algorithm for Submarine