use of org.yamcs.studio.data.vtype.VDoubleArray in project yamcs-studio by yamcs.
the class Sine2DWaveform method nextValue.
@Override
VDoubleArray nextValue() {
if (initialReference == null) {
initialReference = lastTime;
}
double t = initialReference.until(lastTime, ChronoUnit.SECONDS);
var omega = 2 * Math.PI / periodInSeconds;
var k = 2 * Math.PI / wavelengthInSamples;
var min = -1.0;
var max = 1.0;
var range = 0.0;
return (VDoubleArray) ValueFactory.newVNumberArray(generateNewValue(omega, t, k), new ArrayInt(ySamples, xSamples), ValueUtil.defaultArrayDisplay(new ArrayInt(ySamples, xSamples)), alarmNone(), newTime(lastTime), newDisplay(min, min + range * 0.1, min + range * 0.2, "", DOUBLE_FORMAT, min + range * 0.8, min + range * 0.9, max, min, max));
}
use of org.yamcs.studio.data.vtype.VDoubleArray in project yamcs-studio by yamcs.
the class Square2DWaveform method nextValue.
@Override
VDoubleArray nextValue() {
if (initialReference == null) {
initialReference = lastTime;
}
double t = initialReference.until(lastTime, ChronoUnit.SECONDS);
var omega = 2 * Math.PI / periodInSeconds;
var k = 2 * Math.PI / wavelengthInSamples;
var min = -1.0;
var max = 1.0;
var range = 0.0;
return (VDoubleArray) ValueFactory.newVNumberArray(generateNewValue(omega, t, k), new ArrayInt(ySamples, xSamples), ValueUtil.defaultArrayDisplay(new ArrayInt(ySamples, xSamples)), alarmNone(), newTime(lastTime), newDisplay(min, min + range * 0.1, min + range * 0.2, "", DOUBLE_FORMAT, min + range * 0.8, min + range * 0.9, max, min, max));
}
Aggregations