Fermat curve path planning method for ship trajectory tracking