Magnetometer HMC5883L

I have this code and i want to know why my values are not constant even when i'm not moving the sensor, so these are the values without moving the sensor:

52 -106 -421
52 -106 -421
51 -105 -423
51 -105 -423
52 -106 -422
52 -106 -423
52 -106 -423
51 -106 -422
51 -106 -422
51 -106 -422
52 -106 -423
51 -106 -422
51 -106 -422
53 -106 -422
and another question i have is how to scale the raw data i get from the sensor, and convert it in degrees?

//
#include<Wire.h>//Libreria para comunicacion con protocolo I2C usado por el sensor
#include<LiquidCrystal.h>//Libreria para control de LCD de 16x2

define IDENTIFICADOR 30 // identificador de fabrica del sensor HMC5883l HONEYWELL (0011110) 7bits (ver el datasheet pag 11 para valor HEXADECIMAL) 30=0011110=0x1E

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{

Serial.begin(9600);// Iniciar comunicacion serial con una razon de BAUDIOS de 9600
delay(90);//Retardo de 90 ms
Wire.begin();//Iniciar comunicacion I2C
lcd.begin(16,2);
// En esta seccion se hace un SET-UP a los registros de configuracion A,B del asi como el registro de modo de operacion del sensor para:
//seleccionar el modo de trabajo,muestras promediadas por mediciones en salida
//BITS de razon de informacion de salida,BITS de configuracion de medicion, modos de medicion y hz,
//BITS de configuracion de ganancia,

//Configurar registro A de 8 bits
Wire.beginTransmission(IDENTIFICADOR);//Establecer comunicacion con el sensor
Wire.write(byte(0x00));//Seleccionar registro A
Wire.write(byte(0x74));//Establecer muestras promedio/medicion de salida=8, 30hz, modo normal,0x74=01110100
Wire.endTransmission();//Finalizar transmission
delay(90);
//Configurar registro B
Wire.beginTransmission(IDENTIFICADOR);
Wire.write(byte(0x01));//Seleccionar registro B
Wire.write(byte(0x40));//Establecer ganancia para CAMPO MAGNETICO DE 1.9 GAUSS
Wire.endTransmission();
delay(90);
//Configurar registro de modo
Wire.beginTransmission(IDENTIFICADOR);
Wire.write(byte(0x02));//Seleccionar registro de modo
Wire.write(byte(0x80));//Establecer modo continuo a 3400khz(Alta velocidad)
Wire.endTransmission();
delay(90);
}

void loop()
{
int I,J,K;//VECTORES BASE CANONICA

//Establecer 0x03 como mas significativo
Wire.beginTransmission(IDENTIFICADOR);
Wire.write(byte(0x03));//Seleccionar registro 3
Wire.endTransmission();
//Leer datos del de los registros de salida 2 bytes por cada registro
Wire.requestFrom(IDENTIFICADOR,6);
if(6<=Wire.available())
{
I = Wire.read()<<8; //X msb
I |= Wire.read(); //X lsb
K = Wire.read()<<8; //Z msb
K |= Wire.read(); //Z lsb
J= Wire.read()<<8; //Y msb
J |= Wire.read(); //Y lsb
//lcd.clear();
//Serial.print("I: ");
Serial.print(I);
//lcd.print("I:");
//lcd.print(byte(I));
//lcd.print(" ");
//lcd.print("J:");
//lcd.print((J));
//lcd.setCursor(0,1);
//lcd.print("K:");
//lcd.print(K);
Serial.print(" ");
Serial.print(J);
Serial.print(" ");
Serial.println(K);
delay(30);

}

}

That variation is the normal noise in the sensor. Averaging several measurements will reduce the noise.

To get accurate measurements in degrees, you first need to properly calibrate the magnetometer. Here is an introduction to my favorite procedure. Sailboat Instruments: Improved magnetometer calibration (Part 1)
The rest is vector mathematics. Google for tutorials on using magnetometers. Here is one http://www.loveelectronics.co.uk/Tutorials/8/hmc5883l-tutorial-and-arduino-library

I agree for accurate measurements we need to first calibrate the magnetometer as they are very sensitive. Following the instruction on the above post I will also request you to have a strong look at the Magnetometer modules available online. One low cost breakout board I found in

For more sensors you can have a look at these
http://doproto.com/store/7-sensors

Regards
Polash