Class ProximityParamsConfigs
- All Implemented Interfaces:
ParentConfiguration,ISerializable,Cloneable
Includes proximity mode and the threshold for simple detection
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe minimum allowable signal strength before determining the measurement is valid.doubleHow far above and below the threshold the distance needs to be to trigger undetected and detected, respectively.doubleThreshold for object detection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final DistanceHelper method to get this configuration's ProximityHysteresis parameter converted to a unit type.final DistanceHelper method to get this configuration's ProximityThreshold parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final ProximityParamsConfigswithMinSignalStrengthForValidMeasurement(double newMinSignalStrengthForValidMeasurement) Modifies this configuration's MinSignalStrengthForValidMeasurement parameter and returns itself for method-chaining and easier to use config API.final ProximityParamsConfigswithProximityHysteresis(double newProximityHysteresis) Modifies this configuration's ProximityHysteresis parameter and returns itself for method-chaining and easier to use config API.final ProximityParamsConfigswithProximityHysteresis(Distance newProximityHysteresis) Modifies this configuration's ProximityHysteresis parameter and returns itself for method-chaining and easier to use config API.final ProximityParamsConfigswithProximityThreshold(double newProximityThreshold) Modifies this configuration's ProximityThreshold parameter and returns itself for method-chaining and easier to use config API.final ProximityParamsConfigswithProximityThreshold(Distance newProximityThreshold) Modifies this configuration's ProximityThreshold parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
ProximityThreshold
Threshold for object detection.- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
-
ProximityHysteresis
How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively. This is used to prevent bouncing between the detected and undetected states for objects on the threshold.If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
-
MinSignalStrengthForValidMeasurement
The minimum allowable signal strength before determining the measurement is valid.If the signal strength is particularly low, this typically means the object is far away and there's fewer total samples to derive the distance from. Set this value to be below the lowest strength you see when you're detecting an object with the CANrange; the default of 2500 is typically acceptable in most cases.
- Minimum Value: 1
- Maximum Value: 15000
- Default Value: 2500
- Units:
-
-
Constructor Details
-
ProximityParamsConfigs
public ProximityParamsConfigs()
-
-
Method Details
-
withProximityThreshold
Modifies this configuration's ProximityThreshold parameter and returns itself for method-chaining and easier to use config API.Threshold for object detection.
- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
- Parameters:
newProximityThreshold- Parameter to modify- Returns:
- Itself
-
withProximityThreshold
Modifies this configuration's ProximityThreshold parameter and returns itself for method-chaining and easier to use config API.Threshold for object detection.
- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
- Parameters:
newProximityThreshold- Parameter to modify- Returns:
- Itself
-
getProximityThresholdMeasure
Helper method to get this configuration's ProximityThreshold parameter converted to a unit type. If not using the Java units library,ProximityThresholdcan be accessed directly instead.Threshold for object detection.
- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
- Returns:
- ProximityThreshold
-
withProximityHysteresis
Modifies this configuration's ProximityHysteresis parameter and returns itself for method-chaining and easier to use config API.How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively. This is used to prevent bouncing between the detected and undetected states for objects on the threshold.
If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
- Parameters:
newProximityHysteresis- Parameter to modify- Returns:
- Itself
-
withProximityHysteresis
Modifies this configuration's ProximityHysteresis parameter and returns itself for method-chaining and easier to use config API.How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively. This is used to prevent bouncing between the detected and undetected states for objects on the threshold.
If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
- Parameters:
newProximityHysteresis- Parameter to modify- Returns:
- Itself
-
getProximityHysteresisMeasure
Helper method to get this configuration's ProximityHysteresis parameter converted to a unit type. If not using the Java units library,ProximityHysteresiscan be accessed directly instead.How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively. This is used to prevent bouncing between the detected and undetected states for objects on the threshold.
If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
- Returns:
- ProximityHysteresis
-
withMinSignalStrengthForValidMeasurement
public final ProximityParamsConfigs withMinSignalStrengthForValidMeasurement(double newMinSignalStrengthForValidMeasurement) Modifies this configuration's MinSignalStrengthForValidMeasurement parameter and returns itself for method-chaining and easier to use config API.The minimum allowable signal strength before determining the measurement is valid.
If the signal strength is particularly low, this typically means the object is far away and there's fewer total samples to derive the distance from. Set this value to be below the lowest strength you see when you're detecting an object with the CANrange; the default of 2500 is typically acceptable in most cases.
- Minimum Value: 1
- Maximum Value: 15000
- Default Value: 2500
- Units:
- Parameters:
newMinSignalStrengthForValidMeasurement- Parameter to modify- Returns:
- Itself
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceISerializable- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Returns:
- Return code of the deserialize method
-
clone
-