Mercurial > hg > aimc
comparison src/CAR.cpp @ 486:c6bd1d58e72e carfac_cpp
stubbed CAR_coefficients constructor
author | Ulf.Hammarqvist@gmail.com |
---|---|
date | Sat, 31 Mar 2012 18:15:17 +0000 |
parents | 715fc47a965e |
children | d56da20c09ae |
comparison
equal
deleted
inserted
replaced
485:181df875bf84 | 486:c6bd1d58e72e |
---|---|
1 #include "CAR.h" | 1 #include "CAR.h" |
2 #include "CARFAC_common.h" | 2 #include "CARFAC_common.h" |
3 #include <cmath> | |
3 | 4 |
4 CAR_coefficients::CAR_coefficients(CAR_parameters* CAR_params, float fs, | 5 CAR_coefficients::CAR_coefficients(CAR_parameters* car_params, float fs, |
5 FloatArray pole_freqs){ | 6 FloatArray pole_freqs){ |
6 // TODO stuff goes here | 7 |
8 // initialisation of the FloatArray coefficients, if needed. | |
9 | |
10 float f = pow(car_params->zero_ratio_, 2) + 1; | |
11 | |
12 FloatArray theta = pole_freqs; | |
13 FloatArray c0 = pole_freqs; | |
14 FloatArray a0 = pole_freqs; | |
15 | |
16 // temp until we get eigen in | |
17 for(float i=0; i<theta.size(); i++){ | |
18 theta[i] *= (2*kPi*fs); // scalar mult. | |
19 c0[i] = sin(theta[i]); | |
20 a0[i] = cos(theta[i]); | |
21 } | |
22 | |
23 // etc | |
24 | |
7 } | 25 } |
8 | 26 |
9 CAR_coefficients::~CAR_coefficients(){ | 27 CAR_coefficients::~CAR_coefficients(){ |
10 // TODO Auto-generated destructor stub | 28 // TODO Auto-generated destructor stub |
11 } | 29 } |