
public class HallSensorSimulator extends Object
Each instance of this class calculates a time-ordered set of Hall transitions for a single motion of a blade set. The transitions may be recovered as many times as needed by creating a stream from them.
Instances of this class are immutable.
This version of the class describes the old shutter test bench having a single blade set. The positions of Hall sensors and magnets is completely hard-coded. Use of a blade-set configuration is not yet implemented so the true positions of transitions in mm isn't available.
Hall sensor model:
BladePosition.When extending a blade set from the fully retracted position, the first transition pair begins when the edge reaches woff with one further transition pair every time it travels a further distance s. At the start of the last transition pair the last magnet will be just at the start of the window of the last sensor at position 1 - woff - w. The first magnet will therefore be at 1 - woff - w + (nm-1)*s and will have traveled a distance of 1 - woff - w + (nm-1)*s - woff since the start of the first transition pair. Since transition pairs are spaced at travel distance s the total distance traveled must also be (no. of transitions - 1)*s = (nm*nh - 1)*s. Then 1 - 2*woff -w +(nm-1)*s = (nm*nh-1)*s, or s = (1 - 2*woff - w) / (nm*(nh - 1)).
Parameters, currently hard coded:
Since we know the position of the blade set's edge for every possible transition we just need to pick those positions that fall within the path traced by the edge. Then we can use the inverse position function of the motion profile to determine the time of each transition.
| Constructor and Description |
|---|
HallSensorSimulator(long startTime,
double startPosition,
double endPosition,
MotionProfile profile)
Find all the Hall transitions relevant to the given motion of the blade set.
|
| Modifier and Type | Method and Description |
|---|---|
Stream<HallTransition> |
getTransitions()
Gets the time-ordered stream of Hall transitions.
|
public HallSensorSimulator(long startTime,
double startPosition,
double endPosition,
MotionProfile profile)
startTime - the starting time (a system time stamp in microseconds)startPosition - the starting position of the blade set edgeendPosition - the ending position of the blade set edgeprofile - the description of the physical motionpublic Stream<HallTransition> getTransitions()
Copyright © 2019 LSST. All rights reserved.