Click or drag to resize

BaseDistanceSensorSanityCheckMeasurements Method

Check if measurements at a position are sensible. At least two measurements are needed for the check. It is checked that the measurements are not exactly the same value and that the values are within the sanityCheckThreshold from each other (measurements must be very close but not the same).

Namespace: RAYLASE.Marker.Device.DistanceSensor
Assembly: RAYLASE.Marker.Device (in RAYLASE.Marker.Device.dll) Version: 2.26.1
Syntax
C#
public static double SanityCheckMeasurements(
	IList<double> measurements,
	double sanityCheckThreshold
)

Parameters

measurements  IListDouble
List of measurements at same position to check.
sanityCheckThreshold  Double
Range within all measurements must be.

Return Value

Double
Average of all measurements if valid.
Exceptions
ExceptionCondition
ExceptionThrows if the check is unsuccessful.
See Also