Package org.yamcs.studio.data.sim
Class GaussianWaveform
Function to simulate a waveform containing a gaussian that moves to the left.
-
Field Summary
Fields inherited from class org.yamcs.studio.data.sim.SimFunction
lastTime
-
Constructor Summary
ConstructorDescriptionCreates a gaussian wave of 100 samples, with period of 1 second, standard deviation of 100 samples, updating every 100ms (10Hz).GaussianWaveform
(Double periodInSeconds, Double stdDev, Double nSamples, Double updateRateInSeconds) Creates a gaussian wave of given number of samples, with given period and standard, updating at the given rate -
Method Summary
Modifier and TypeMethodDescriptionstatic double
gaussian
(double x, double centerX, double width) 1D gaussian, centered on centerX and with the specified width.Methods inherited from class org.yamcs.studio.data.sim.SimFunction
createValues, getTimeBetweenSamples
-
Constructor Details
-
GaussianWaveform
public GaussianWaveform()Creates a gaussian wave of 100 samples, with period of 1 second, standard deviation of 100 samples, updating every 100ms (10Hz). -
GaussianWaveform
public GaussianWaveform(Double periodInSeconds, Double stdDev, Double nSamples, Double updateRateInSeconds) Creates a gaussian wave of given number of samples, with given period and standard, updating at the given rate- Parameters:
periodInSeconds
- the period measured in secondsstdDev
- standard deviation of the gaussian distributionnSamples
- number of elements in the waveformupdateRateInSeconds
- time between samples in seconds
-
-
Method Details
-
gaussian
public static double gaussian(double x, double centerX, double width) 1D gaussian, centered on centerX and with the specified width.- Parameters:
x
- coordinate xcenterX
- center of the gaussian on xwidth
- width of the gaussian in all directions- Returns:
- the value of the function at the given coordinates
-