@Override public double getIntegralLeakRatio() { return integralLeakRatio.getDoubleValue(); } }
public double getDA() { return lengthDC.getDoubleValue(); } }
@Override public double getMaximumIntegralError() { if (!usingIntegrator) { return 0.0; } return maxIntegralError.getDoubleValue(); }
/** {@inheritDoc} */ public double getParallelDampingDeadband() { return dampingParallelToMotionDeadband.getDoubleValue(); }
private void setGainsReducedIfBacklash() { double proportionalGain = gainReduction.getDoubleValue() * maxProportionalGain.getDoubleValue(); double derivativeGain = gainReduction.getDoubleValue() * maxDerivativeGain.getDoubleValue(); super.setProportionalGain(proportionalGain); super.setDerivativeGain(derivativeGain); }
public void computeMasterJointAngleGivenAngleABC(double angleABCInRadians) { double B = angleABCInRadians; double f = unknownTriangleSideLengthByLawOfCosine(lengthBA.getDoubleValue(), lengthCB.getDoubleValue(), B); double D = getAngleWithCosineLaw(lengthDC.getDoubleValue(), lengthAD.getDoubleValue(), f); double angleACB = getAngleWithCosineLaw(lengthCB.getDoubleValue(), f, lengthBA.getDoubleValue()); double angleACD = getAngleWithCosineLaw(lengthDC.getDoubleValue(), f, lengthAD.getDoubleValue()); double C = angleACB + angleACD; double A = 2 * PI - D - B - C; this.angleDAB = A; }
@Override public void update() { if (position == null) { throw new NullPointerException("YoFilteredVelocityVariable must be constructed with a non null " + "position variable to call update(), otherwise use update(double)"); } update(position.getDoubleValue()); }
private double alphaFilter(double currentValue) { double previousFilteredValue = this.getDoubleValue(); double a = this.alpha; if (alphaVariable != null) { a = alphaVariable.getDoubleValue(); } double ret = a * previousFilteredValue + (1.0 - a) * currentValue; return ret; }
@Override public void update() { if (velocity == null) { throw new NullPointerException( "BacklashProcessingYoVariable must be constructed with a non null " + "velocity variable to call update(), otherwise use update(double)"); } update(velocity.getDoubleValue()); }
public void update() { if (dataSource == null) { throw new NullPointerException("AverageSampleYoDouble must be constructed with a non null " + "dataSource variable to call update(), otherwise use update(double)"); } update(dataSource.getDoubleValue()); }
public void startTransition(double lengthOfTransitionTime) { transitionStartTime.set(time.getDoubleValue()); this.lengthOfTransitionTime = lengthOfTransitionTime; }
public void update() { if (inputVariable == null) throw new NullPointerException("DeadzoneYoVariable must be constructed with a non null " + "input variable to call update(), otherwise use update(double)"); update(inputVariable.getDoubleValue()); }
public double compute(double currentPosition, double desiredPosition, double currentRate, double desiredRate) { positionError.set(applyDeadband(desiredPosition - currentPosition)); rateError.set(desiredRate - currentRate); actionP.set(getProportionalGain() * positionError.getDoubleValue()); actionD.set(getDerivativeGain() * rateError.getDoubleValue()); return actionP.getDoubleValue() + actionD.getDoubleValue(); }
public Status update() { if (variableToCheck.getDoubleValue() > upperLimit) status.set(Status.ABOVE_LIMIT); else if (variableToCheck.getDoubleValue() < lowerLimit) status.set(Status.BELOW_LIMIT); else status.set(Status.IN_RANGE); return status.getEnumValue(); }
public static void getFromYoVariablesMatrix(DenseMatrix64F m, List<List<YoDouble>> yoM) { for (int i = 0; i < m.getNumRows(); i++) { List<YoDouble> row = yoM.get(i); for (int j = 0; j < m.getNumCols(); j++) { m.set(i, j, row.get(j).getDoubleValue()); } } }
public void setBias(double bias) { useBias.set(true); this.bias.set(bias); if (bias > biasMax.getDoubleValue()) biasMax.set(bias); if (bias < biasMin.getDoubleValue()) biasMin.set(bias); biasDelta.set(0.0); }
public void update(double perfectValue) { perfect.set(perfectValue); if (isNoisy.getBooleanValue()) { double noise = getBias() + getRandomNoise(); super.set(perfect.getDoubleValue() + noise); } else super.set(perfect.getDoubleValue()); // System.out.println("NoisyYoDouble Diff: (" + this.getName() + ")" + (super.getDoubleValue() - perfect.getDoubleValue())); }
public static void getFromYoVariables(DenseMatrix64F m, YoDouble[][] yoM) { for (int i = 0; i < m.getNumRows(); i++) { for (int j = 0; j < m.getNumCols(); j++) { m.set(i, j, yoM[i][j].getDoubleValue()); } } }
public void doAverage() { if (dataLength.getIntegerValue() < 1) return; set(dataCumulated.getDoubleValue() / dataLength.getValueAsDouble()); reset(); }
public void updateForAngles(double currentPosition) { if (!hasBeenCalled.getBooleanValue()) { hasBeenCalled.set(true); lastPosition.set(currentPosition); set(0.0); } double difference = AngleTools.computeAngleDifferenceMinusPiToPi(currentPosition, lastPosition.getDoubleValue()); updateUsingDifference(difference); lastPosition.set(currentPosition); }