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@2:86c3cb25577b, 2014-07-21 (annotated)
- Committer:
- rebonatto
- Date:
- Mon Jul 21 00:58:34 2014 +0000
- Revision:
- 2:86c3cb25577b
- Parent:
- 0:c64e1194230b
Problemas com objeto para aquisi??o da rfid (serial)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rebonatto | 0:c64e1194230b | 1 | /* |
rebonatto | 0:c64e1194230b | 2 | * SignalProcessor.h |
rebonatto | 0:c64e1194230b | 3 | * |
rebonatto | 0:c64e1194230b | 4 | * Created on: |
rebonatto | 0:c64e1194230b | 5 | * Author: |
rebonatto | 0:c64e1194230b | 6 | */ |
rebonatto | 0:c64e1194230b | 7 | |
rebonatto | 0:c64e1194230b | 8 | #ifndef SIGNALPROCESSOR_H |
rebonatto | 0:c64e1194230b | 9 | #define SIGNALPROCESSOR_H |
rebonatto | 0:c64e1194230b | 10 | |
rebonatto | 0:c64e1194230b | 11 | #include <math.h> |
rebonatto | 0:c64e1194230b | 12 | |
rebonatto | 0:c64e1194230b | 13 | #include "Capture.h" |
rebonatto | 0:c64e1194230b | 14 | #include "Settings.h" |
rebonatto | 0:c64e1194230b | 15 | |
rebonatto | 0:c64e1194230b | 16 | class SignalProcessor |
rebonatto | 0:c64e1194230b | 17 | { |
rebonatto | 0:c64e1194230b | 18 | |
rebonatto | 0:c64e1194230b | 19 | static float* ComplexFFT(unsigned short int* data, int sign, int ch); |
rebonatto | 0:c64e1194230b | 20 | |
rebonatto | 0:c64e1194230b | 21 | public: |
rebonatto | 0:c64e1194230b | 22 | |
rebonatto | 0:c64e1194230b | 23 | //static void CalculateRMSBulk(float *result); |
rebonatto | 0:c64e1194230b | 24 | static void CalculateRMSBulk(float *result, float *vm2, int *under, int *over); |
rebonatto | 0:c64e1194230b | 25 | static float CalculateRMS(unsigned short int *buffer,int nChannel); |
rebonatto | 0:c64e1194230b | 26 | static void CalculateFFT(unsigned short int *buffer,float *sen,float *cos,float *vm,int sign, int ch); |
rebonatto | 0:c64e1194230b | 27 | //static float DFT(float *data, float *seno, float *coss); |
rebonatto | 0:c64e1194230b | 28 | |
rebonatto | 0:c64e1194230b | 29 | }; |
rebonatto | 0:c64e1194230b | 30 | |
rebonatto | 0:c64e1194230b | 31 | #endif |