atState

open fun atState(encoderState: Double, @NonNull coeffs: Array<Double>): Motor.GainScheduling

Specify a position or velocity in encoder ticks that you want the gains of your system controller to be during this state. This should be used with known values, such as knowing for 0 ticks the gains should be 1,0,0, etc.

The more positions that are added to this builder, the more accurate your final gain scheduling model will be.

Note that the maximum domain that interpolated gains scheduling will be available for is limited by the min/max values you supply in this builder. Your controller will clamp to the boundary if the encoder is out of the function domain.

Multiple calls to construct this builder will discard old gain scheduling.

Return

the builder

Parameters

encoderState

the position (or velocity) system state in encoder ticks that the controller coefficients should be set to

coeffs

the coefficients at encoder ticks position or velocity