If this works ok I'm very happy to turn it into a library.
It seems to work well here - if anything it's just a shame that there's no absolute position measurement built in here - but the actual roll/pitch/yaw looks like it works ok
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've just converted the Madgwick code:
If this works ok I'm very happy to turn it into a library.
It seems to work well here - if anything it's just a shame that there's no absolute position measurement built in here - but the actual roll/pitch/yaw looks like it works ok