micarray.h 1020 Bytes
Newer Older
Mert Burkay Çöteli's avatar
Mert Burkay Çöteli committed
1
2
3
4
5
6
7
8
#pragma once

#include <string> 
#include <vector>
#include <complex>

#define PI 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
enum class ArrayType
{
	Spherical,
	Circular,
	Planar,
	Linear,
	Other
};

enum class ArrayScattering
{
	Rigid,
	Open,
	OtherArray
};
Mert Burkay Çöteli's avatar
Mert Burkay Çöteli committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

using namespace std;
class micarray
{
public:
	micarray();
	vector<float> getmicthetas();
	vector<float> getmicphis();
	void addnewmicrophone(float mic_x,float mic_y,float mic_z, float mic_ld_x, float mic_ld_y, float mic_ld_z,float ma_x,float ma_y,float ma_z);
private:
	void ConvertCartesionToSpherical(float& distance, float& theta, float& phi, float& x, float& y, float& z);
	void ConvertSphericalToCartesian(float& distance, float& theta, float& phi, float& x, float& y, float& z);
	int numberofmicrophones;
	vector<float> microphonetheta;
	vector<float> microphonephi;
	vector<float> microphonedistance;
	vector<float> microphone_x;
	vector<float> microphone_y;
	vector<float> microphone_z;
};