I'm trying to do sound triangulation mathematically, and I'm a little lost.
I have a list of latitudes, longitudes, heights and precise times, each representing the same sound as heard by a number of different detectors at different locations:
$$sample_1 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_2 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_3 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_4 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_5 = \{position_x,\quad position_y,\quad position_z,\quad time\} \\\vdots$$
I know that the origin point of the sound can be represented by a latitude, longitude, height and time:
$$origin = \{position_x,\quad position_y,\quad position_z,\quad time\}$$
I also know that there is an inherent link between different representations of the same sound, connected by the distance in space and time and the speed of sound. I'm trying to find the origin point, as a latitude, longitude, height and time, and I don't need someone to solve everything for me, I'm just looking for a starting point, some first steps that can help me figure out a complete solution that can be implemented algorithmically as a computer program.
Using cartesian coordinates.
The model is $$t=T+\frac 1 c\sqrt{(x-X)^2+(y-Y)^2+(z-Z)^2}\tag 1$$ where $v$ is the speed of sound,and $X,Y,Z$ the coordinates of the transmitter.
You have $n$ data points $(x_i,y_i,z_i,t_i)$ which makes the problem looking like a nonlinear regression and, as usual, it is important to have good starting values. To get them, rewrite $(1)$ as $$e_i=(x_i-X)^2+(y_i-Y)^2+(z_i-Z)^2-c^2(t_i-T)^2 \tag 2$$ Now consider $$f_{ij}=e_i-e_j\tag 3$$ Develop, expand and group terms; this makes $\frac{n(n-1)}2$ equations which write $$\text{lhs}_{ij}=(x_j^2-x_i^2)+(y_j^2-y_i^2)+(z_j^2-z_i^2)+c^2(t_i^2-t_j^2)$$ $$\text{rhs}_{ij}=2(x_j-x_i)X+2(y_j-y_i)Y+2(z_j-z_i)Z+2c^2(t_i-t_j) T$$ So, a multilinear regression (or, better, matrix operations) will give you the estimates of $X,Y,Z,T$ from which you can very safely start the nonlinear regression (if you need to polish the estimates).
This works very well (I used this method for years in industry).
Edit
For illustration purposes, I took the following case ($c=300$ m/s) $$\left( \begin{array}{cccc} x_i & y_i & z_i & t_i \\ 123 & 234 & 456 & 50.20 \\ 234 & 456 & 789 & 49.48 \\ 345 & 678 & 901 & 48.92 \\ 456 & 789 & 12 & 49.10 \\ 567 & 890 & 123 & 48.54 \\ 789 & 12 & 345 & 49.40 \\ 890 & 123 & 456 & 48.85 \end{array} \right)$$
The first step leads to $$X=1241.10 \qquad Y=995.36 \qquad Z=656.36 \qquad T=45.624$$
Going to nonlinear regression leads to the following results $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} \\ X & 1232.27 & 5.01 \\ Y & 987.67& 3.60 \\ Z & 653.59 & 2.13 \\ T & 45.682 & 0.019 \\ \end{array}$$ The data were generated using $X=1234$, $Y=987$, $Z=654$, $T=45.678$ and the times were rounded to the second decimal place.