I am working on a project that's supposed to "track down" the destination of Sounds.
For that i have 2 microphone arrays placed next to each other to later construct an triangle and find its position, but that's getting out of scope.
At the moment i have 2 dicts with all the microphones and how many decibel they heard.
microphoneRadians = {
"a": 0,
"b": pi / 4,
"c": pi / 2,
"d": 3 * pi / 4,
"e": pi,
"f": 5 * pi / 4,
"g": 3 * pi / 2,
"h": 7 * pi / 4
}
horizontalArrays = {
"A": {"a": 70, "b": 90, "c": 90, "d": 65, "e": 50, "f": 40, "g": 40, "h": 40},
"B": {"a": 40, "b": 50, "c": 70, "d": 100, "e": 70, "f": 50, "g": 40, "h": 40},
}
As you might have noticed this is just example data since the microphones haven't arrived yet.
In this image i have already constructed an Triangle but to do this in my program later i need to find the direction of where an sound came from (from array A and B).
Basically i am looking for an function that i can pass in such an microphone arrays dict and it returns me the radiant of where it came from.
Also here is a quick problem i ran into:
You cant just use the max() function to find where it was the loudest and then just resolve the microphone name / letter to the Radiant because it will be imprecise.
For example Array A, where b and c are the highest (90), If they both heard 90db it would be in the middle of them so π/3.
And also in the real world, if a=80db and b=95db π/4 (radiant of microphone b is π/4) wont be the correct answer).
Thanks for any help even tough this is a very complicated question (at least for me), And since i am planning to expand this project and with that also expand my expertise, please tell me the way you found the solution.