it is also posted in Science and Measurement...
You need a minimum of 3 readings to determine the source, 4 increases your confidence.Typically you have a circle of uncertainty around each point, and where those circles intersect is the origin point.How are you determining the distance from ABC to an impact point?With things like earthquakes, they work backwards using time.An event is known to have occurred.They know the time that each sensor first felt it. They know the time of the impact.They know (more or less) the speed of the wavefront thru water, rock etc.So (sensor_time - impact_time)/speed of propagation = distance away. There's your circle of uncertainty.Then do the math to find the intersection point.
I don't think he got an impact time. The first signal that triggers is then defined as t=0. The others are delta values (so called TDOA) to the first dtn=tn - t etc. So, when you put up your equation of the circles, your radii of 3 circles will have an unknown delta in common for which you have also to resolve (resolve for x,y, and r). BTW, this problem is actually called multilateration http://en.wikipedia.org/wiki/Multilateration.
Also as to my initial line of thought, i do not have the incoming signal angle, which would help to solve the problemwith triangle formulas..
A hyperbola is a set of all points P such that the difference between the distances from P to the foci, F1 and F2, are a constant K
QuoteAlso as to my initial line of thought, i do not have the incoming signal angle, which would help to solve the problemwith triangle formulas.. Just some food for thought , (not a solution for your current problem which has been addressed quite well by the previous post of johnwasser): There is a technique to get an angle from an impact with 2 sensors using an... tada: artificial head. The mics are mounted in the ears. As the sound arrives at two different times, while one of them impacts directly you will have a slight phase shift from which you can determine a rough determination of angle (as long as you don't have sine sounds, which makes it complicate with high tones. Humans are quite good in this technique. the phase shift determination is done using autocorrelation functions, and this technique works also quite well in a noisy ambient.
Based on timing and the speed of sound you have the length of line segments A1, B2 and C3. You want to find the point of impact in the center of the circle. Call the radius of that circle R. The distance of the impact from the four corners is 0:R, 1:A1+R, 2:B2+R, 3:C3+R. Write out the four equations and solve for the three unknowns: R, Xi and Yi (the coordinates of impact).For example: SQRT((Xi-X0)**2+(Yi-Y0)**2) = SQRT((Xi-X1)**2+(Yi-Y1)**2) - AI = SQRT((Xi-X2)**2+(Yi-Y2)**2) - B2 = SQRT((Xi-X3)**2+(Yi-Y3)**2) - C3 = RYou can probably just drop out the R and solve for (Xi,Yi).
--update --Sorry, my first reasoning was far too simplified ==> removed; a retry.You need the distance between the microphones and the two delta T arrival times of the shockwave to do the math. If you have three points A, B and C. arrival times of soundwave (in order)A - T0 B - T1C - T2 The fact that the soundwave arrived at A first defines an area(1) of all points P: d.PA < d.PB and d.PA < d.PC (d.PA = distance PA)The delta-time AB = T1 - T0 defines a distance d1 = (T1 - T0) /so (so = speed Sound)The delta-time AC = T2 - T0 defines a distance d2 = (T2 - T0) /so define the curve of all points Q: d.QA - d.QB = d1 (.QA = distance QA)define the curve of all points R: d.RA - d.RC = d2These two curves cross each other in area (1) => the point of impact ==> Q == R.-- update --if you knew the time of impact the d.QA, dQB and d.QC would be known, making the math faaaaar simpler as these curves are not trivial - quadratic asymptotic beasts with sqrts in it - Think it is easier to write an approximating algorithm that searches the point.The fact that point A heard the soundwave first => d.QA < d.QB-- update 2 --from: - http://www.mathwarehouse.com/hyperbola/graph-equation-of-a-hyperbola.phpQuoteA hyperbola is a set of all points P such that the difference between the distances from P to the foci, F1 and F2, are a constant Kso my "quadratic asymptotic beasts with sqrts in it" can be rewritten as hyperbola with A and B (A & C) as foci. using the drawing of the webpage above:Assume A = (0,-c) and B = (0,c) and the constant K = d1 = (T1 - T0) /so. The point (0,-a) where the hyperbola crosses the Y-axis is (0, -d1/2)--> http://www.mathwarehouse.com/hyperbola/focus-of-hyperbola.phpTo determine the foci one uses a^2 + b^2 = c^2 => b^2 = c^2 - a^2 = (d.AB/2)^2 - (d1/2)^2The formula of the hyperbola becomes : y^2 / (-d1/2)^2 - x^2 / (d.AB/2)^2 - (-d1/2)^2 = 1Same trick for the points A & C (hint: it is easier to use another reference framework to determine the formula and do a translation afterwards: X -> X-xdelta Y -> Y-ydelta)TODO: determine intersection points of the two hyperbolas and then your close...-- update 3 --intersection points-- http://www.analyzemath.com/HyperbolaProblems/hyperbola_intersection.html Difference with the location problem is that the hyperbola defined by points AB and the one defined by points AC are 'orthogonal' - think of it as the red in the drawing rotated 90 degrees (make a drawing!!) There will be two intersection points and because the soundwave arrived first at A it becomes obvious which one to choose.The code is left as an exercise ....