The best distance to measure Azimuth would be based on the wavelength of the frequency the antenna is designed to operate in. The distance should be greater than the reactive near field of the antenna because the electric and magnetic fields are out of phase and the EM energy is completely stored. Some anechoic chambers can make these measurements in the radiating near field where the EM fields become less reactive (a portion of the EM energy is converted into radiation), however, these chamber require a significant amount of 3D calibration from a known calibrated source antenna and are computationally intense to determine the azimuth. It is best to measure the azimuth in the radiating far field where the reactive fields become negligible and the radiating fields dominate. The electric and magnetic fields in this region are perpendicular, in-phase, and the ratio between their magnitudes become constant.
Where r is the distance from the antenna, D is the maximum antenna dimension, and λ is the wavelength.