Is it possible to define the position of a gunshot using and array of microphones? If I had four microphones, located on poles that were at corners of a square that's 300 feet on a side (or some other specific configuration that would make the math easier), would I be able to use the difference in time between each mic to determine where the gun shot occurred?  Let's presume 2 dimensions, and that the shot occurred at least 1000 feet from the closest mic.
The closest mic would be "0" delay, then each other mic would have a non-zero delay.  And we know how far away from each other, and what direction each mic is with respect to the others.
It seems like it would be possible to determine the direction the sound came from, at least.  Then one might extrapolate to having another set of mics that was positioned such that the same gun shot would be seen as coming from the west, while the original set had it coming from the north.  So you'd have a precise location.
How would one calculate the direction and distance to a "bang" using the difference in when the sound reached a set of microphones?
 A: Continuing from amd's answer, let us suppose in three dimensions that you know the spatial coordinates $(x_i,y_i,z_i)$ for each of the $n$  microphones as well as the speed of sound $v$. Let $t_i$ the time at which at which the shot has been percieved by  microphone $i$ and $\tau$ the time at which the shot happened. Let us name $(X,Y,Z)$ the coordinates of the place where the shot was done.
So, for each microphone, the equation is $$(X-x_i)^2+(Y-y_i)^2+(Z-z_i)^2=\big(v(t_i-\tau)\big)^2$$ The problem can be simplified if we consider all the $i/j$ possibilities subtraction equation $i$ from equation $j$. This leads to
$$2(x_j-x_i)X+2(y_j-y_i)Y+2(z_j-z_i)Z+2v^2\tau(t_i-t_j)=2v^2(t_i^2-t_j^2)+(x_j^2+y_j^2+z_j^2)-(x_i^2+y_i^2+z_i^2)$$ and the problem reduces to a linear least square fit since we know everything except $X,Y,Z,\tau$.
But, since all $t_i$ are in error (even if the errors are small), you must consider all combinations of $i$ and $j$  $(j\neq i)$. If you have $n$ microphones, this will provide $\frac{n(n-1)}2$ equations (then data points) for the fit. 
Now, if you want more rigor, having these good estimates, you could go further and minimize $$SSQ=\sum_{i=1}^n \Big((X-x_i)^2+(Y-y_i)^2+(Z-z_i)^2-\big(v(t_i-\tau)\big)^2  \Big)^2$$ which is an highly nonlinear model. But having obtained good estimates from the first step, this should solve quite fast.
A: Assuming a constant speed of sound $v$, you have $t_i=\|\mathbf s-\mathbf m_i\|/v$ for the time it takes the sound of the shot to reach the microphone at $\mathbf m_i$ from the shot’s location $\mathbf s$. You have two or three unknowns: the shortest travel time $t_0$ and the two or three spatial coorsinates of $\mathbf s$. With a sufficient number of microphones you can find a unique solution to this system of equations.  
Note that this amounts to simultaneously adjusting the radii of a set of circles (or spheres) centered on the microphones until all of them intersect, while maintaining a fixed set of differences among them. In practice, you’ll have to allow for some slop, deal with echoes, &c.
