Class ElevatorFeedforward
java.lang.Object
com.stuypulse.stuylib.control.Controller
com.stuypulse.stuylib.control.feedforward.ElevatorFeedforward
A feedforward term to account for gravity for motorized lifts.
The motor feedforward used in the context of a lift will not account for gravity that is acting on the lift.
Can be paired with MotorFeedforward or other controllers with .add
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculate
(double setpoint, double measurement) Calculate voltage to hold elevator at setpoint heightMethods inherited from class com.stuypulse.stuylib.control.Controller
add, getError, getMeasurement, getOutput, getSetpoint, isDone, setMeasurementFilter, setOutputFilter, setSetpointFilter, update
-
Constructor Details
-
ElevatorFeedforward
Create ElevatorFeedforward- Parameters:
kG
- voltage to hold lift
-
-
Method Details
-
calculate
protected double calculate(double setpoint, double measurement) Calculate voltage to hold elevator at setpoint height- Specified by:
calculate
in classController
- Parameters:
setpoint
- setpointmeasurement
- measurement- Returns:
- kG
-