Package com.inertia.orientation
Class ImuFilter
java.lang.Object
com.inertia.orientation.ImuFilter
- All Implemented Interfaces:
OrientationFilter
public class ImuFilter extends java.lang.Object implements OrientationFilter
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description double[]
orientation()
get current orientationvoid
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 accelerationsvoid
setGyroBias(double x, double y, double z)
Deprecated.double[]
update(double dt, double[] accel, double[] magn, double[] gyro)
Function to compute one filter iteration
-
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 interfaceOrientationFilter
-
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 interfaceOrientationFilter
- Parameters:
x
- x-axisy
- y-axisz
- 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 interfaceOrientationFilter
- Parameters:
bell_a
- controls the height of the bell curve peakbell_w
- controlls the width of the bell curve
-
orientation
public double[] orientation()Description copied from interface:OrientationFilter
get current orientation- Specified by:
orientation
in interfaceOrientationFilter
- 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 interfaceOrientationFilter
- Parameters:
dt
- time difference with previous sampleaccel
- acceleration vectormagn
- magnetometer vectorgyro
- gyroscope vector- Returns:
- orientation quaternion
-