this algorith is used for averaging compass values

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Yamartino.h Source File

Yamartino.h

00001 #ifndef YAMARTINO_H
00002 #define YAMARTINO_H
00003 #include "mbed.h"
00004 
00005 //Yamartino algorithm is used for averaging compass values
00006 class Yamartino
00007 {
00008 public:
00009 
00010 int historyLength;
00011 //float* history; // keep our history values
00012 float* historyX;
00013 float* historyY;
00014 
00015 Yamartino();
00016 float calculateYamartinoAverage();
00017 float myAtan2(float y, float x);
00018 void addItemsToHistoryBuffers(float input);
00019 void addToHistory(float* buffer, float input);
00020 
00021 };
00022 
00023 
00024 #endif