public class CIMCurrentEstimator
extends java.lang.Object
| Constructor and Description |
|---|
CIMCurrentEstimator(int numMotors,
double controllerVDrop_V,
PowerDistributionPanel pdp)
Sets up the current estimator with the system parameters.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getCurrentEstimate(double motorSpeed_radpersec,
double motorCommand)
Determines a unique file name, and opens a file in the data captures directory and writes the
initial lines to it.
|
public CIMCurrentEstimator(int numMotors,
double controllerVDrop_V,
PowerDistributionPanel pdp)
numMotors - Integer number of motors in the gearbox system. Usually 2 or 3 for a side of
a drivetrain, or 1 for a single motor.controllerVDrop_V - voltage drop induced by the motor controller, in V.pdp - Instance of the PDP class from the top level (needed for voltage measurements)public double getCurrentEstimate(double motorSpeed_radpersec,
double motorCommand)
motorSpeed_radpersec - The speed of the motor input shaft in radians per second.
Measured from an encoder attached to the same mechanism as the motor(s).motorCommand - The command sent to the motor (-1 to 1 range).