public DoubleYoVariable getYoQz() { return getOrientation().getYoQz(); } }
public void verifyYovariableNames(String imuName, YoFrameQuaternion orientation, YoFrameVector angularVelocity, YoFrameVector linearAcceleration) { if (!orientation.getYoQx().getName().contains(imuName)) throw new RuntimeException("The orientation variable: " + orientation.getYoQx().getName() + " may not belong to the IMU: " + imuName); if (!orientation.getYoQy().getName().contains(imuName)) throw new RuntimeException("The orientation variable: " + orientation.getYoQy().getName() + " may not belong to the IMU: " + imuName); if (!orientation.getYoQz().getName().contains(imuName)) throw new RuntimeException("The orientation variable: " + orientation.getYoQz().getName() + " may not belong to the IMU: " + imuName); if (!orientation.getYoQs().getName().contains(imuName)) throw new RuntimeException("The orientation variable: " + orientation.getYoQs().getName() + " may not belong to the IMU: " + imuName); if (!angularVelocity.getYoX().getName().contains(imuName)) throw new RuntimeException("The angular velocity variable: " + angularVelocity.getYoX().getName() + " may not belong to the IMU: " + imuName); if (!angularVelocity.getYoY().getName().contains(imuName)) throw new RuntimeException("The angular velocity variable: " + angularVelocity.getYoY().getName() + " may not belong to the IMU: " + imuName); if (!angularVelocity.getYoZ().getName().contains(imuName)) throw new RuntimeException("The angular velocity variable: " + angularVelocity.getYoZ().getName() + " may not belong to the IMU: " + imuName); if (!linearAcceleration.getYoX().getName().contains(imuName)) throw new RuntimeException("The linear acceleration variable: " + linearAcceleration.getYoX().getName() + " may not belong to the IMU: " + imuName); if (!linearAcceleration.getYoY().getName().contains(imuName)) throw new RuntimeException("The linear acceleration variable: " + linearAcceleration.getYoY().getName() + " may not belong to the IMU: " + imuName); if (!linearAcceleration.getYoZ().getName().contains(imuName)) throw new RuntimeException("The linear acceleration variable: " + linearAcceleration.getYoZ().getName() + " may not belong to the IMU: " + imuName); } }
private YoFrameQuaternionValidityChecker(String inputName, YoFrameQuaternion input, YoVariableRegistry parentRegistry) { registry = new YoVariableRegistry(inputName + "ValidityChecker"); parentRegistry.addChild(registry); this.input = input; if (input != null) { validityCheckers[0] = new DoubleYoVariableValidityChecker(input.getYoQx(), registry); validityCheckers[1] = new DoubleYoVariableValidityChecker(input.getYoQy(), registry); validityCheckers[2] = new DoubleYoVariableValidityChecker(input.getYoQz(), registry); validityCheckers[3] = new DoubleYoVariableValidityChecker(input.getYoQs(), registry); } else { validityCheckers[0] = new DoubleYoVariableValidityChecker(inputName + "Qx", registry); validityCheckers[1] = new DoubleYoVariableValidityChecker(inputName + "Qy", registry); validityCheckers[2] = new DoubleYoVariableValidityChecker(inputName + "Qz", registry); validityCheckers[3] = new DoubleYoVariableValidityChecker(inputName + "Qs", registry); } }