Very strange about the pitch - I'd wondered whether pitch only varies between 0 and 180 degrees (so rolls over), but it seems you have around - 180 in there too!
Maybe you could try comparing the pitch you have with the raw values? It looks like you're using twos complement, but some devices just use 15 bits + sign for signed values?
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.
Very strange about the pitch - I'd wondered whether pitch only varies between 0 and 180 degrees (so rolls over), but it seems you have around - 180 in there too!
Maybe you could try comparing the pitch you have with the raw values? It looks like you're using twos complement, but some devices just use 15 bits + sign for signed values?