Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope mbed MODSERIAL
Diff: Filterdesigns.cpp
- Revision:
- 16:8f175d2a472f
- Parent:
- 15:c1a8f28d6583
- Child:
- 17:cfe44346645c
--- a/Filterdesigns.cpp Fri Oct 09 09:00:16 2015 +0000
+++ b/Filterdesigns.cpp Fri Oct 09 09:57:09 2015 +0000
@@ -1,6 +1,5 @@
#include "Filterdesigns.h"
#include "Filter.h"
-#include "Meanvalue.h"
// Inputwaardes
@@ -41,20 +40,14 @@
double gem = 0.4557; // gemiddelde waarde emgsignaal
-//gemiddelde bepalen
-double sum = 0;
-int a = 0;
-int delay = 40;
-int samples_length = 10;
-
-void Filterdesigns(double u, double &y, double &ymean)
+void Filterdesigns(double u, double &y)
{
//u = input waarde
//y = output waarde
-
- u = u - gem; // lees waarde van emg signaal uit
-
+
+ u = u - gem; // gemiddelde bepalen
+
// Op deze manier worden de waardes ingelezen in Filter. Zorg dus voor dezelfde volgorde, zodat de waardes goed uitgelezen worden!:
// Filter(double u, double &v1, double &v2, const double a1, const double a2, const double b0, const double b1, const double b2, const double gain)
@@ -71,9 +64,5 @@
// Low Pass filter. Alles vanaf 5Hz wordt weggefilterd
double yLP = Filter(y1, v1_LP, v2_LP, a1_LP, a2_LP, b0_LP, b1_LP, b2_LP, gain_LP);
- y = yLP;
-
- ymean = Meanvalue(y, sum, a, ymean, delay);
- //ymean = Meansmooth(y, samples_length, ymean);
-
+ y = 10 * yLP;
}
\ No newline at end of file