Class TorqueLookUpTable
java.lang.Object
org.texastorque.torquelib.control.TorqueLookUpTable
Implements a lookup table with lerp interpolation between values
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
calculate
(double distance) Returns the closest disjoint data based on the distance provided.getLerpPoint
(TorqueLookUpTable.TorqueDisjointData lowestPoint, TorqueLookUpTable.TorqueDisjointData highestPoint, double distance) Returns a calculated data point based off of a lerp fit between the two closest disjoint data pointsgetLinearPoint
(TorqueLookUpTable.TorqueDisjointData lowestPoint, TorqueLookUpTable.TorqueDisjointData highestPoint, double distance) Returns a calculated data point based off of a linear fit between the two closest disjoint data points
-
Constructor Details
-
TorqueLookUpTable
public TorqueLookUpTable()
-
-
Method Details
-
addDisjointData
-
calculate
Returns the closest disjoint data based on the distance provided. -
getLinearPoint
public TorqueLookUpTable.TorqueDisjointData getLinearPoint(TorqueLookUpTable.TorqueDisjointData lowestPoint, TorqueLookUpTable.TorqueDisjointData highestPoint, double distance) Returns a calculated data point based off of a linear fit between the two closest disjoint data points -
getLerpPoint
public TorqueLookUpTable.TorqueDisjointData getLerpPoint(TorqueLookUpTable.TorqueDisjointData lowestPoint, TorqueLookUpTable.TorqueDisjointData highestPoint, double distance) Returns a calculated data point based off of a lerp fit between the two closest disjoint data points
-