Tangent law of perpendicular fields
External magnetic field B may be written in terms horizontal component of earth’s magnetic field BH and deflection of compass needle θ.
B = BH tan θ
Gauss’s law for magnetism
∫B.dS = µ0*minside0
But minside0 is zero as we do not have an isolated magnetic pole in nature. The smallest unit of the source of magnetic field is a magnetic dipole where the net magnetic pole is zero.
Hence Gauss’s law for magnetism states that
∫B.dS = 0