Moved magnetometer buffer to global array