The schematic diagram of the optical compass. A linearly polarized bichromatic optical pump is sent through the 87Rb atomic cell placed in a homogeneous magnetic field B. The transmission of the cell is measured as a function of the polarization direction E, set with a polarization rotation (λ/2) wave plate. There are two maxima corresponding to the mutually orthogonal magnetic field and the optical polarization, E||n where n=[k×B]). The measurement determines the plane defined by the direction of the light propagation and the magnetic field vector (k,B). The direction of the magnetic field ±B (the method does not allow one to distinguish between B and -B) is obtained by the repetition of the measurement using optical pump propagating in a different direction k1(k1≠k).