annotate 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
rev   line source
Ulf@477 1 #include "CAR.h"
Ulf@484 2 #include "CARFAC_common.h"
Ulf@486 3 #include <cmath>
Ulf@477 4
Ulf@486 5 CAR_coefficients::CAR_coefficients(CAR_parameters* car_params, float fs,
Ulf@484 6 FloatArray pole_freqs){
Ulf@486 7
Ulf@486 8 // initialisation of the FloatArray coefficients, if needed.
Ulf@486 9
Ulf@486 10 float f = pow(car_params->zero_ratio_, 2) + 1;
Ulf@486 11
Ulf@486 12 FloatArray theta = pole_freqs;
Ulf@486 13 FloatArray c0 = pole_freqs;
Ulf@486 14 FloatArray a0 = pole_freqs;
Ulf@486 15
Ulf@486 16 // temp until we get eigen in
Ulf@486 17 for(float i=0; i<theta.size(); i++){
Ulf@486 18 theta[i] *= (2*kPi*fs); // scalar mult.
Ulf@486 19 c0[i] = sin(theta[i]);
Ulf@486 20 a0[i] = cos(theta[i]);
Ulf@486 21 }
Ulf@486 22
Ulf@486 23 // etc
Ulf@486 24
Ulf@477 25 }
Ulf@477 26
Ulf@484 27 CAR_coefficients::~CAR_coefficients(){
Ulf@483 28 // TODO Auto-generated destructor stub
Ulf@477 29 }