Adrien-Legrand / AS5X47

A library for Arduino boards that reads angles from AS5047 and AS5147 sensors. Also handles encoder configuration.
MIT License
17 stars 7 forks source link

Why is missing 2*pi? or Why is it multiplied by 360? #4

Closed pierreramiro closed 2 years ago

pierreramiro commented 2 years ago

Hello, I trying to understand why is not divided by 2pi when you read the angle from the register. I understood the 2**14 division due to the amount of bits, but why it is multiplied by 360 and not divided by 2pi?? https://github.com/Adrien-Legrand/AS5X47/blob/d79378fe1c263c27dd945a47f7d406440eb4fa6f/src/AS5X47.cpp#L71

Adrien-Legrand commented 2 years ago

Because the standard behavior of the library is to return the angle in degrees, not in radians.