this algorith is used for averaging compass values

Committer:
fin4478
Date:
Tue Aug 12 11:52:35 2014 +0000
Revision:
0:726c69fad7d8
Initial

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fin4478 0:726c69fad7d8 1 #ifndef YAMARTINO_H
fin4478 0:726c69fad7d8 2 #define YAMARTINO_H
fin4478 0:726c69fad7d8 3 #include "mbed.h"
fin4478 0:726c69fad7d8 4
fin4478 0:726c69fad7d8 5 //Yamartino algorithm is used for averaging compass values
fin4478 0:726c69fad7d8 6 class Yamartino
fin4478 0:726c69fad7d8 7 {
fin4478 0:726c69fad7d8 8 public:
fin4478 0:726c69fad7d8 9
fin4478 0:726c69fad7d8 10 int historyLength;
fin4478 0:726c69fad7d8 11 //float* history; // keep our history values
fin4478 0:726c69fad7d8 12 float* historyX;
fin4478 0:726c69fad7d8 13 float* historyY;
fin4478 0:726c69fad7d8 14
fin4478 0:726c69fad7d8 15 Yamartino();
fin4478 0:726c69fad7d8 16 float calculateYamartinoAverage();
fin4478 0:726c69fad7d8 17 float myAtan2(float y, float x);
fin4478 0:726c69fad7d8 18 void addItemsToHistoryBuffers(float input);
fin4478 0:726c69fad7d8 19 void addToHistory(float* buffer, float input);
fin4478 0:726c69fad7d8 20
fin4478 0:726c69fad7d8 21 };
fin4478 0:726c69fad7d8 22
fin4478 0:726c69fad7d8 23
fin4478 0:726c69fad7d8 24 #endif