本文整理汇总了Java中org.apache.commons.math3.filter.DefaultMeasurementModel类的典型用法代码示例。如果您正苦于以下问题:Java DefaultMeasurementModel类的具体用法?Java DefaultMeasurementModel怎么用?Java DefaultMeasurementModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultMeasurementModel类属于org.apache.commons.math3.filter包,在下文中一共展示了DefaultMeasurementModel类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Kalman
import org.apache.commons.math3.filter.DefaultMeasurementModel; //导入依赖的package包/类
/**
* Default constructor used for a new timeline.
*/
public Kalman() {
ProcessModel pm = new DefaultProcessModel(DEFAULT_A, DEFAULT_B, DEFAULT_Q, DEFAULT_X_VECTOR, DEFAULT_P);
MeasurementModel mm = new DefaultMeasurementModel(DEFAULT_H, DEFAULT_R);
filter = new KalmanFilter(pm, mm);
lastMemUpdated();
}
示例2: setProperties
import org.apache.commons.math3.filter.DefaultMeasurementModel; //导入依赖的package包/类
@Override
protected void setProperties(Properties data) throws IllegalArgumentException {
// currently constant - write/read for future extension
Utils.getDouble(data, KEY_MEASUREMENT_NOISE, DEFAULT_MEASUREMENT_NOISE); // ignore value
RealMatrix mA = getMatrix(data, KEY_MATRIX_A, DEFAULT_A);
RealMatrix mB = getMatrix(data, KEY_MATRIX_B, DEFAULT_B);
RealMatrix mH = getMatrix(data, KEY_MATRIX_H, DEFAULT_H);
RealMatrix mQ = getMatrix(data, KEY_MATRIX_Q, DEFAULT_Q);
RealMatrix mR = getMatrix(data, KEY_MATRIX_R, DEFAULT_R);
// variable
RealMatrix mP = getMatrix(data, KEY_MATRIX_P, DEFAULT_P);
RealVector xVector = getVector(data, KEY_VECTOR_X, DEFAULT_X_VECTOR);
controlVector = getVector(data, KEY_VECTOR_CONTROL, controlVector);
lastUpdated = Utils.getLong(data, KEY_LAST_UPDATED, lastUpdated);
lastUpdate = Utils.getDouble(data, KEY_LAST_UPDATE, lastUpdate);
allowedGap = Utils.getInt(data, KEY_ALLOWED_GAP, allowedGap);
defaultMeasurement = Utils.getDouble(data, KEY_DEFAULT_MEASUREMENT, defaultMeasurement);
try {
ProcessModel pm = new DefaultProcessModel(mA, mB, mQ, xVector, mP); // xVector, mP
MeasurementModel mm = new DefaultMeasurementModel(mH, mR);
filter = new KalmanFilter(pm, mm);
} catch (NullArgumentException | DimensionMismatchException | MatrixDimensionMismatchException e) {
throw new IllegalArgumentException(e.getMessage());
}
}