com.yobotics.simulationconstructionset.util.math.filter
Class AlphaFusedYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.util.math.filter.AlphaFusedYoVariable
- All Implemented Interfaces:
- Observable, java.io.Serializable
public class AlphaFusedYoVariable
- extends YoVariable
- Author:
- jrebula
A YoFusedVariable takes two inputs measuring the same signal and
filters them together. One of the signals is considered accurate
at low frequencies and the other accurate at high frequencies. The
user also supplies an alpha which relates the relative confidence
frequencies. Either the underlying inputs must be passed in to a
constructor as YoVariables and update() called every tick or
update(double, double) must be called every tick with the variables.
The YoAlphaFilteredVariable updates it's val with the current filtered
version using
steady_state_offset_{n} = steady_state_offset_{n-1} + alpha * (fused_{n-1} - slow_signal_{n})
fused_{n} = fast_signal_{n} - steady_state_offset_{n}
A lower alpha means that the relative confidence frequency of the
slowSignal is lower.
- See Also:
- Serialized Form
|
Constructor Summary |
AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha)
|
AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha,
YoVariable slowSignal,
YoVariable fastSignal)
|
AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
YoVariable alphaVariable,
YoVariable slowSignal,
YoVariable fastSignal)
|
|
Method Summary |
void |
reset()
|
void |
update()
|
void |
update(double slowSignalVal,
double fastSignalVal)
|
| Methods inherited from class com.yobotics.simulationconstructionset.YoVariable |
addObserver, fullNameEndsWith, getBooleanValue, getDescription, getDoubleValue, getEnumValue, getFullNameWithNameSpace, getIntegerValue, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValue, getShortName, getValue, getYoVariableRegistry, getYoVariableType, hasSameFullName, notifyObservers, removeAllObservers, removeObserver, set, set, set, set, setManualScalingMinMax, toString, valueEquals, valueEquals, valueEquals, valueEquals |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AlphaFusedYoVariable
public AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha)
AlphaFusedYoVariable
public AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha,
YoVariable slowSignal,
YoVariable fastSignal)
AlphaFusedYoVariable
public AlphaFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
YoVariable alphaVariable,
YoVariable slowSignal,
YoVariable fastSignal)
reset
public void reset()
update
public void update()
update
public void update(double slowSignalVal,
double fastSignalVal)