Go Down

Topic: RunningAverage Class on playground (updated) (Read 8288 times) previous topic - next topic

robtillaart

The RA lib uses floats which are on an AVR based Arduino 32bits IEEE754 floats. This means a 23 bit mantissa which equals about 7 significant digits.

If you are using an ARM based Arduino, which supports 64 bit double you could patch the library by replacing all float types with double. Should be a good change anyway. On my todo list.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

robtillaart

updated Running Average Library to version 0.2.05 on GITHUB
- https://github.com/RobTillaart/Arduino/tree/master/libraries/RunningAverage -

changed float to double
==> support for double on ARM of the Arduino DUE ...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

GPSJay

Thanks Rob.

BTW I'm using a MEGA with GPS engines running at 4Hz...

robtillaart

updated Running Average Library to version 0.2.06 on GITHUB

- https://github.com/RobTillaart/Arduino/tree/master/libraries/RunningAverage -

+ minor edits
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy