"Scalar encoder" the number of "w"


#1

I can see Scalar encoder’s parameter of “w” is restricted odd number and w>=21.
Why is this?


#2

I remember asking @scott this same question a long time ago, but I don’t remember his answer.


#3

I believe it is so the “center” is absolutely in the middle. The ScalarEncoder deals with a concept called “half width” and another called “padding” where bits to the left and right of the absolute “center” are created in order to establish the radius and resolution.

If you read the code and documentation beginning here it should clear things up a bit…

Cheers,
David


#4

Thank you for your reply! I will check it soon!