/*f^*/ typedef struct { double real; double image; } dcomplex_t; typedef struct { int frequency; double power; } powerspec_t; #ifndef M_PI #define M_PI 3.14159265358979 #endif void real2cmp(double r[],dcomplex_t c[],int size); void hanning(dcomplex_t data[],int size); void expand(dcomplex_t x[],int size); void rectwindow(dcomplex_t data[],int size,int lowerlimit,int upperlimit); void makepower(dcomplex_t s[],double pow[],int size,int mode); void fft(int cdir,dcomplex_t x[],int size); void initfft(int fftsize); void postfft(void); void calcPowerspectrum(double timedomain[],int size,long int samplingfrequency,powerspec_t powerspec[]);