HMC5883L-bytes-to-vector
Convert the raw hex bytes of HMC5883L to a 3d vector. Note this handles the twos compliment conversion and swaps the z component into the 3rd position in the vector.
Input
X MSB
X LSB
Z MSB This is not a typo, the compass places the z component in the 2nd position
Z LSB
Y MSB
Y LSB
Output X int Y int Z int
var hmc5883lBytes2Vec = ;var rawBytes = 0x000x31 0xff0x310x000x23;var vector = ;//vector = [ 49, 35 -207 ]