pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class Complementary

    Fuses a drifting rate, such as a gyroscope's, with a noisy absolute reading, such as an accelerometer's tilt, into one steady estimate.

    Index
    • Creates a filter. alpha is the weight on the integrated rate, held to 0 to 1: near 1 trusts the rate and corrects slowly. One that is not a number is taken as 0.

      Parameters

      • alpha: number
      • initial: number

      Returns Complementary

    • get estimate(): number

      The current estimate.

      Returns number

    • Fuses a rate and an absolute reading over dt and returns the estimate. If any of the three is not a finite number, the update is ignored.

      Parameters

      • rate: number
      • absolute: number
      • dt: number

      Returns number