Proximity sensor

The proximity sensor was a sensor device that determined how close another object was.

Navigational uses
A proximity alarm warned Cadet Jean Hajar of an impending collision with Cadet Joshua Albert's training craft, allowing herself and most of her Nova Squadron teammates who were flying in tight formation to initiate their emergency transporters before their ships were destroyed in the ensuing pileup. 

Lieutenant Jadzia Dax had to repair the proximity systems on an abandoned, decrepit Bajoran raider hidden in an underground cavern so that she and Major Kira Nerys did not end up "bouncing off the walls". 

Military uses
Proximity sensors are commonly used on mines, where they trigger the mine's detonation when it nears or impacts a target. A malfunction in a proximity sensor could cause the mine either to detonate prematurely or to not detonate at all.