Some researchers from Vanderbilt have developed a new app and hardware module that will help you find the direction of gunfire. The research team used the sonic signatures associated with firing to pinpoint its location, and put this on an Android smartphone map.
Originally developed for the Department of Defense, acoustic shockwave bearing estimation was designed to help soldiers locate snipers. The technology takes advantage of the properties associated with gunfire – the initial flash of the muzzle blast and the shockwaves that follow. The supersonic speeds and whizzes of bullets can be tracked with microphones and a really precise clock hooked up to a microprocessor. These sensor nodes communicate with smartphones via Bluetooth; data from a few differently placed sensor nodes are required to triangulate the location of the gunshots.
The sniper location system was built into combat helmets, but the research team has now updated it for smartphones with funding from DARPA. Some nodes are still required, so civilian use may not be practical. But the researchers think security details or police squad cars could make use of the smartphone version.