From 025bb603373ad6fba4f4a9db121a1651a62cde53 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 18 Mar 2016 22:54:53 +0100 Subject: [PATCH] [DEV] add base of delay and sum --- lutinParseSubFolders.txt | 1 + tools/beamforming/beamPattern.cpp | 37 ++++++++++++++++ tools/beamforming/beamPattern.gnuplot | 6 +++ tools/beamforming/freqResp.cpp | 42 +++++++++++++++++++ tools/beamforming/freqResp.gnuplot | 11 +++++ .../lutin_audio-drain-tools-beam-pattern.py | 0 ...tin_audio-drain-tools-frequency-respond.py | 0 tools/beamforming/polar.gnuplot | 19 +++++++++ 8 files changed, 116 insertions(+) create mode 100644 lutinParseSubFolders.txt create mode 100644 tools/beamforming/beamPattern.cpp create mode 100644 tools/beamforming/beamPattern.gnuplot create mode 100644 tools/beamforming/freqResp.cpp create mode 100644 tools/beamforming/freqResp.gnuplot create mode 100644 tools/beamforming/lutin_audio-drain-tools-beam-pattern.py create mode 100644 tools/beamforming/lutin_audio-drain-tools-frequency-respond.py create mode 100644 tools/beamforming/polar.gnuplot diff --git a/lutinParseSubFolders.txt b/lutinParseSubFolders.txt new file mode 100644 index 0000000..93c8700 --- /dev/null +++ b/lutinParseSubFolders.txt @@ -0,0 +1 @@ +tools/beamforming \ No newline at end of file diff --git a/tools/beamforming/beamPattern.cpp b/tools/beamforming/beamPattern.cpp new file mode 100644 index 0000000..88882c6 --- /dev/null +++ b/tools/beamforming/beamPattern.cpp @@ -0,0 +1,37 @@ +#include +#include +// http://www.labbookpages.co.uk/audio/beamforming/delaySum.html +#define ANGLE_RESOLUTION 500 // Number of angle points to calculate + +int main(void) { + int numElements = 4; // Number of array elements + double spacing = 0.2; // Element separation in metres + double freq = 1000.0; // Signal frequency in Hz + double speedSound = 343.0; // m/s + // Iterate through arrival angle points + for (int32_t aaa=0; aaa +#include +// http://www.labbookpages.co.uk/audio/beamforming/delaySum.html + +// Number of freq points to calculate +#define FREQ_RESOLUTION 500 +// Number of angle points to calculate +#define ANGLE_RESOLUTION 500 + +int main(void) { + int numElements = 4; // Number of array elements + double spacing = 0.2; // Element separation in metre + double speedSound = 343.0; // m/s + // Iterate through arrival angle points + for (int32_t fff=0; fff