#pragma once
class Filter
{
  public:

    float Freq;

    struct
    {
      float Value;
      //---
      float Min, Max;
      //---
      bool EnAcc;
      float Acc;
      //---
      bool EnGPS;
      float Width, Length;
      //---
    }Position;

    

    struct
    {
      float ValueAccGPS;
      float ValueGPS;
      float Value;
      //---
      float Min, Max;
      //---
      bool EnAcc;
      float Acc;
      float AccGPS;
      //---
      bool EnGPS;
      float Width, Length;
    }Speed;

    struct
    {
      float Pos[100];
      float Acc[100];
      float Spd[100];
      long Size, Index;
    }Delay;

    float* Update(bool valid, float gps, float acc);

    float Limit(float Value, float Min, float Max);
    float Minimum(float Value1, float Value2);

};
