Class ImuFilter

java.lang.Object
com.inertia.orientation.ImuFilter
All Implemented Interfaces:
OrientationFilter

public class ImuFilter
extends java.lang.Object
implements OrientationFilter
  • Constructor Summary

    Constructors 
    Constructor Description
    ImuFilter()
    constructor Create ImuFilter with default beta value (5.0°/s)
    ImuFilter​(double gyroMeasDegrees)
    constructor
    ImuFilter​(int gyro_still_period, double gyroMeasDegrees)
    Deprecated.
  • Method Summary

    Modifier and Type Method Description
    double[] orientation()
    get current orientation
    void reInitGyro​(int still_period)
    Deprecated.
    void setAccelAffinity​(double bell_a, double bell_w)
    The filter uses a bell curve around acceleration changes to diminish the effect of high accelerations
    void setGyroBias​(double x, double y, double z)
    Deprecated.
    double[] update​(double dt, double[] accel, double[] magn, double[] gyro)
    Function to compute one filter iteration

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImuFilter

      public ImuFilter()
      constructor Create ImuFilter with default beta value (5.0°/s)
    • ImuFilter

      public ImuFilter​(double gyroMeasDegrees)
      constructor
      Parameters:
      gyroMeasDegrees - degrees of gyro measurement error in beta value (e.g. default 5.0°/s)
    • ImuFilter

      @Deprecated public ImuFilter​(int gyro_still_period, double gyroMeasDegrees)
      Deprecated.
  • Method Details

    • reInitGyro

      @Deprecated public void reInitGyro​(int still_period)
      Deprecated.
      Specified by:
      reInitGyro in interface OrientationFilter
    • setGyroBias

      @Deprecated public void setGyroBias​(double x, double y, double z)
      Deprecated.
      Description copied from interface: OrientationFilter
      Set the Gyro bias in radians
      Specified by:
      setGyroBias in interface OrientationFilter
      Parameters:
      x - x-axis
      y - y-axis
      z - z-axis
    • setAccelAffinity

      public void setAccelAffinity​(double bell_a, double bell_w)
      The filter uses a bell curve around acceleration changes to diminish the effect of high accelerations
      Specified by:
      setAccelAffinity in interface OrientationFilter
      Parameters:
      bell_a - controls the height of the bell curve peak
      bell_w - controlls the width of the bell curve
    • orientation

      public double[] orientation()
      Description copied from interface: OrientationFilter
      get current orientation
      Specified by:
      orientation in interface OrientationFilter
      Returns:
      orientation quaternion
    • update

      public double[] update​(double dt, double[] accel, double[] magn, double[] gyro)
      Description copied from interface: OrientationFilter
      Function to compute one filter iteration
      Specified by:
      update in interface OrientationFilter
      Parameters:
      dt - time difference with previous sample
      accel - acceleration vector
      magn - magnetometer vector
      gyro - gyroscope vector
      Returns:
      orientation quaternion