pololu / lsm303-arduino

Arduino library for Pololu LSM303 boards
http://www.pololu.com/catalog/product/2124
MIT License
140 stars 137 forks source link

Heading Decimal Values #6

Closed byourself83 closed 11 years ago

byourself83 commented 11 years ago

Is it possible to produce the heading with any decimal values or in binary that can be changed to a decimal? Some applications may desire tenth of degree measurements.

se5a commented 11 years ago

I expect that's more dependant on the sensor itself.

kevin-pololu commented 11 years ago

I think should be straightforward to change the heading() function to return a decimal by changing the return type and getting rid of the call to round(). I'll look into doing this for a future release of the library, but you can make the change on your own copy of the library if you want to use it right away.

As se5a mentioned, whether the sensor itself can provide accurate enough data to allow 1/10 degree accuracy is a different question; I'm not sure offhand, and you might have to look into testing or calculating that yourself.