How to convert IST8310 Compss RAW value to unitTesla?

Hi Jimit here, I am writing IST8310 Compass driver, I don't know how to convert raw values to microTesla I don't know please help me? am I doing right?

#include <Arduino.h>
#include <Wire.h>
int8_t DEVICE_ID_VAL = 0;

#define IST_8310_ADDRESS 0x0E
#define WHO_AM_I 0x00
#define IST_CNTL1_ADDRESS 0x0A
#define IST_CNTL2_ADDRESS 0x0B
#define SINGLE_MESSUREMENT_MODE 0X01
#define MAG_DATA_X 0x03

#define WAI_REG 0x0
#define DEVICE_ID 0x10

#define OUTPUT_X_L_REG 0x3
#define OUTPUT_X_H_REG 0x4
#define OUTPUT_Y_L_REG 0x5
#define OUTPUT_Y_H_REG 0x6
#define OUTPUT_Z_L_REG 0x7
#define OUTPUT_Z_H_REG 0x8

#define CNTL1_REG 0xA
#define CNTL1_VAL_SINGLE_MEASUREMENT_MODE 0x1

#define CNTL2_REG 0xB
#define CNTL2_VAL_SRST 1

#define AVGCNTL_REG 0x41
#define AVGCNTL_VAL_XZ_0 (0)
#define AVGCNTL_VAL_XZ_2 (1)
#define AVGCNTL_VAL_XZ_4 (2)
#define AVGCNTL_VAL_XZ_8 (3)
#define AVGCNTL_VAL_XZ_16 (4)
#define AVGCNTL_VAL_Y_0 (0 << 3)
#define AVGCNTL_VAL_Y_2 (1 << 3)
#define AVGCNTL_VAL_Y_4 (2 << 3)
#define AVGCNTL_VAL_Y_8 (3 << 3)
#define AVGCNTL_VAL_Y_16 (4 << 3)

#define PDCNTL_REG 0x42
#define PDCNTL_VAL_PULSE_DURATION_NORMAL 0xC0

int16_t DATA_X, DATA_Y, DATA_Z;
int16_t MX, MY, MZ;
float mx, my, mz;

void write_register(uint8_t reg, uint8_t value);
uint8_t readRegistor(uint8_t reg, uint8_t buffer);
uint8_t readRegistors(uint8_t reg, uint8_t *buffer, uint8_t len);

void setup()
{
  // put your setup code here, to run once:
  Wire.begin();

  write_register(CNTL2_REG, CNTL2_VAL_SRST);
  delay(10);

  readRegistor(WAI_REG, DEVICE_ID_VAL);

  int8_t reset_count;

  for (; reset_count < 5; reset_count++)
  {
    write_register(CNTL2_REG, CNTL2_VAL_SRST);
    delay(10);

    uint8_t cntl2 = 0xFF;
    if (readRegistor(CNTL2_REG, &cntl2) && (cntl2 & 0x01) == 0)
    {
      break;
    }
  }

  write_register(AVGCNTL_REG, AVGCNTL_VAL_Y_16 | AVGCNTL_VAL_XZ_16);
  write_register(PDCNTL_REG, PDCNTL_VAL_PULSE_DURATION_NORMAL);

  write_register(CNTL1_REG, CNTL1_VAL_SINGLE_MEASUREMENT_MODE);

  Serial.println("Reset Successfull!!!!");
}

void loop()
{
  // put your main code here, to run repeatedly:
  uint8_t buffer[6] = {0};
  readRegistors(MAG_DATA_X, buffer, 6);

  uint8_t LSB2FSV = 3;

  DATA_X = (int16_t)((buffer[1] << 8) | buffer[0]) * LSB2FSV;
  DATA_Y = (int16_t)((buffer[3] << 8) | buffer[2]) * LSB2FSV;
  DATA_Z = (int16_t)((buffer[5] << 8) | buffer[4]) * LSB2FSV;

  write_register(CNTL1_REG, CNTL1_VAL_SINGLE_MEASUREMENT_MODE);

  Serial.print(DATA_X);
  Serial.print(",");
  Serial.print(DATA_Y);
  Serial.print(",");
  Serial.println(DATA_Z);

  delay(10);
}

void write_register(uint8_t reg, uint8_t value)
{
  Wire.beginTransmission(IST_8310_ADDRESS);
  Wire.write(reg);
  Wire.write(value);
  Wire.endTransmission();
}

uint8_t readRegistor(uint8_t reg, uint8_t buffer)
{
  Wire.beginTransmission(IST_8310_ADDRESS);
  Wire.write(reg);
  Wire.endTransmission();
  Wire.requestFrom(IST_8310_ADDRESS, 1);
  while (Wire.available())
  {
    buffer = Wire.read();
    return 1;
  }
  return 0;
}

uint8_t readRegistors(uint8_t reg, uint8_t *buffer, uint8_t len)
{
  Wire.beginTransmission(IST_8310_ADDRESS);
  Wire.write(reg);
  Wire.endTransmission();

  Wire.requestFrom(IST_8310_ADDRESS, len);
  while (Wire.available())
  {
    for (int8_t i = 0; i < len; i++)
    {
      /* code */
      buffer[i] = Wire.read();
    }

    return 1;
  }
  return 0;
}

Divide by the sensitivity value found in the device data sheet (last line in table below):

To check whether the scaling makes sense, look up the magnitude of the Earth's magnetic field at your location, which should be within the range of 22 to 67 uT, and compare to the magnitude of the scaled sensor measurement.