public class EulerFilter
extends java.lang.Object
| Constructor and Description |
|---|
EulerFilter() |
| Modifier and Type | Method and Description |
|---|---|
static int |
filter(double[] ref,
double[] rpy,
double eps,
double[] out)
Performs an Euler filter to prevent artifacts from gimbal lock.
|
static double |
findNearestAngle(double ref,
double ang)
Given an angle
ang, find an equivalent angle that is within
+/- PI of a given reference angle ref. |
static boolean |
isFlipped(int flag) |
static boolean |
isShifted(int flag) |
public static int filter(double[] ref,
double[] rpy,
double eps,
double[] out)
ref - Reference set of angles {roll, pitch, yaw}rpy - Current rpy angles to adjust {roll, pitch, yaw}eps - Threshold to deal with singularity at (yaw - k*Pi/2) < epsout - Adjusted rpy anglespublic static double findNearestAngle(double ref,
double ang)
ang, find an equivalent angle that is within
+/- PI of a given reference angle ref.ref - reference angle (radians)ang - initial angle (radians)ang within +/- PI of
ref.public static boolean isShifted(int flag)
public static boolean isFlipped(int flag)