• haha - the commenting effort comes from my day job (C++ developer) - but if there is enough space - why not to put some comments ;)
    I try out to smooth the rotations and side detection by low pass filter

    // some global stuff
    var alpha = 0.5;
    var mySmoothValue = 0;
    
    // low pass filter to get smooth value without high peak changes
    var newValue = ... // something you want to smooth ;)
    mySmoothValue = newValue * alpha + (mySmoothValue * (1.0 - alpha));
    
About

Avatar for Jorgen @Jorgen started