calculate

fun calculate(velocity: Double, acceleration: Double): Double(source)

Calculates the feedforward output for the given velocity and acceleration.

Return

the feedforward output: kG + kS * sign(velocity) + kV * velocity + kA * acceleration

Parameters

velocity

the target velocity

acceleration

the target acceleration


fun <U : Unit<U>> calculate(state: MotionState<U>): Double(source)

Calculates the feedforward output from a MotionState.

Return

the feedforward output

Parameters

state

the target motion state containing velocity and acceleration