cjdavies:
The raw x/y/z readings from both the accelerometer & the magnetometer are correct (eg the accelerometer axes read 1g when the +ve direction is pointed down, -1g when +ve direction pointed up),
That's definitely wrong, if +Z axis points up to the sky, the Z reading should be +1g.