Versão do protegemed que calcula o tempo em ms da fuga, calcula o numero de onverflow (valores muito baixo) e underflow (valores muito altos). Além disso, calcula um valor médio a partir dos valores capturados e não apenas pela fft.

Dependencies:   EthernetInterface mbed-rtos mbed

Headers/SignalProcessor.h

Committer:
rebonatto
Date:
2014-07-21
Revision:
2:86c3cb25577b
Parent:
0:c64e1194230b

File content as of revision 2:86c3cb25577b:

/*
 * SignalProcessor.h
 *
 *  Created on: 
 *      Author: 
 */
 
#ifndef SIGNALPROCESSOR_H
#define SIGNALPROCESSOR_H

#include <math.h>

#include "Capture.h"
#include "Settings.h"

class SignalProcessor
{

    static float* ComplexFFT(unsigned short int* data, int sign, int ch);
    
public:

    //static void CalculateRMSBulk(float *result);
    static void CalculateRMSBulk(float *result, float *vm2, int *under, int *over);
    static float CalculateRMS(unsigned short int *buffer,int nChannel);
    static void CalculateFFT(unsigned short int *buffer,float *sen,float *cos,float *vm,int sign, int ch);
    //static float DFT(float *data, float *seno, float *coss);
    
};

#endif