 
 #if AccelerometerSoftLPFilter
 #include <FilterOnePole.h>
-#define LowpassFreq 0.04
+#define LowpassFreq 0.005
 auto lpFilter = FilterOnePole( LOWPASS, LowpassFreq );
 #endif
 

    Bluetooth.println("DCalibrating zero-speed");
    
    // avarage
    float x, y, z, sum = 0;
    for (unsigned i = 0; i < calibrationSamples; ++i) {
        mma.getAcceleration(&x, &y, &z);
        sum += x;
    }
    zeroOffset = sum / -calibrationSamples;
    Bluetooth.print("DCalibrated: ");
    Bluetooth.println(zeroOffset*1000);
}

// declarations
void setupBluetooth();
bool setupAccelerometer();
inline float getUnfilteredXAcc();
inline float getXAccSample();
void calibrateZeroVel();
float trapezoidalRule(float fa, float fb, int dt);

