ksf

Dependents:   kinematics_controlv2 kinematics_controlv4 kinematics_control_copyfds Robot_control

Files at this revision

API Documentation at this revision

Comitter:
peterknoben
Date:
Wed Nov 01 14:11:14 2017 +0000
Parent:
2:1a677b57ce81
Child:
4:a79f9f3a9e40
Commit message:
sef

Changed in this revision

signalnumber.cpp Show annotated file Show diff for this revision Revisions of this file
signalnumber.h Show annotated file Show diff for this revision Revisions of this file
--- a/signalnumber.cpp	Wed Nov 01 13:42:01 2017 +0000
+++ b/signalnumber.cpp	Wed Nov 01 14:11:14 2017 +0000
@@ -73,12 +73,12 @@
 n is the amount of samples in the window
 action is the amount of same mean values 
 */
-int SignalNumber::getnumber(const int n, const int action, float input, float k){
-    mean = getmean(n, input)*k;
+int SignalNumber::getnumber(const int n, const int action, float input){
+    mean = getmean(n, input);
     //Check first case
     if( mean < LeftFastmin ) {
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean < LeftFastmin){
                 count2++;
             }
@@ -95,7 +95,7 @@
      //Check second case  
      else if(mean <= LeftFastmax and mean > LeftFastmin){
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean <=LeftFastmax and mean>LeftFastmin){
                 count2++;
             }
@@ -111,7 +111,7 @@
     }
      else if( mean <=LeftSlowmax and mean>LeftSlowmin) {
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean <=LeftSlowmax and mean>LeftSlowmin){
                 count2++;
             }
@@ -127,7 +127,7 @@
      }
      else if( mean <=RightSlowmax and mean>RightSlowmin) {
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean <=RightSlowmax and mean>RightSlowmin){
                 count2++;
             }
@@ -143,7 +143,7 @@
      }
      else if( mean <=RightFastmax and mean>RightFastmin ) {
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean <=RightFastmax and mean>RightFastmin){
                 count2++;
             }
@@ -166,13 +166,13 @@
 
 
 // In progress
-int SignalNumber::getmode(const int n, const int action, float input, float k){
+int SignalNumber::getmode(const int n, const int action, float input){
     int mode;
-    mean = getmean(n, input)*k;
+    mean = getmean(n, input);
     //Check first case
     if( mean < LeftFastmin ) {
         if (count2 <action){
-            mean = getmean(n, input)*k;
+            mean = getmean(n, input);
             if(mean < LeftFastmin){
                 count2++;
             }
--- a/signalnumber.h	Wed Nov 01 13:42:01 2017 +0000
+++ b/signalnumber.h	Wed Nov 01 14:11:14 2017 +0000
@@ -17,9 +17,9 @@
     
     float getmean(const int n, float input);
 
-    int getnumber(const int n, const int action, float input, float k);
+    int getnumber(const int n, const int action, float input);
     
-    int getmode(const int n, const int action, float input, float k); // In progress
+    int getmode(const int n, const int action, float input); // In progress
 
 
 private: