A Model for Calculating Magnetic Field of Underwater Pipeline