
public final class MotorSimulator extends Object
The physical motion profile is sampled at regular intervals, each sampling being used to make a MotorPosition object. The starting time is added to the time-since-move-start used by the profile. The sampling is done once but can be retrieved as many times as needed.
This class is used both for simulating hardware and for predicting the motor movement in the GUI.
Instances are immutable.
| Constructor and Description |
|---|
MotorSimulator(double startPosition,
double dt,
int numSamples,
long startTime,
MotionProfile profile)
Samples the given physical motion profile.
|
| Modifier and Type | Method and Description |
|---|---|
Stream<MotorPosition> |
getPositions()
Returns the motor positions as a stream.
|
public MotorSimulator(double startPosition,
double dt,
int numSamples,
long startTime,
MotionProfile profile)
startPosition - the absolute start position (dimensionless in [0, 1])dt - the time between samples in secondsnumSamples - the number of positions to takestartTime - the starting time in microsecondsprofile - the motion profile to be sampledpublic Stream<MotorPosition> getPositions()
Copyright © 2019 LSST. All rights reserved.