Integrated beam training and environmental sensing in the mmWave prototype system