atPosition

open fun atPosition(positionTicks: Double, coeffs: Array<Double>): Motor.GainScheduling

Specify a position in encoder ticks that you want the gains of your system controller to be. 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

positionTicks

the position in encoder ticks that the system controller coefficients should be

coeffs

the coefficients at encoder ticks position