00001 #ifndef SIGNAL_PROCESSING_H
00002 #define SIGNAL_PROCESSING_H
00003
00004 #include <argos3/core/utility/math/general.h>
00005
00006 namespace argos {
00007
00008
00009
00010
00014 class CStats {
00015
00016 public:
00017
00018 CStats();
00019
00024 inline Real GetMean() const {
00025 return m_fMean;
00026 }
00027
00034 Real GetVariance() const;
00035
00042 inline Real GetStdDev() const {
00043 return Sqrt(GetVariance());
00044 }
00045
00050 void Append(Real f_value);
00051
00052 private:
00053
00054 UInt64 m_unCounter;
00055 Real m_fMean;
00056 Real m_fSumOfSquareDiff;
00057 };
00058
00059
00060
00061
00066 class CRCLowPassFilter {
00067
00068 public:
00069
00074 CRCLowPassFilter(Real f_smoothing_factor);
00075
00081 Real Filter(Real f_input);
00082
00086 void Reset();
00087
00088 private:
00089
00090 Real m_fSmoothingFactor;
00091 Real m_fPreviousOutput;
00092 bool m_bInitialized;
00093 };
00094
00095
00096
00097
00098 }
00099
00100 #endif
00101