anchor.diff:          Z:16/little-signed,
           Gain:8
       >> = Telemetry,
  +    Coef_mG_to_uT = 0.1,   % Converts mili Gauses to micro Teslas.
       Coef = case Sensor of
  -        'HMC5883L' -> lists:nth(Gain + 1, [0.73, 0.92, 1.22, 1.52, 2.27, 2.56, 3.03, 4.35]);
  +        'HMC5883L' -> lists:nth(Gain + 1, [0.73, 0.92, 1.22, 1.52, 2.27, 2.56, 3.03, 4.35] * Coef_mG_to_uT);
           'AK8975'   -> lists:nth(Gain + 1, [0.3])
       end,
       #tm_mag{
  
positive.code:         Z:16/little-signed,
          Gain:8
      >> = Telemetry,
      Coef = case Sensor of
          'MPU6000A' -> lists:nth(Gain + 1, [0.00006103515625, 0.0001220703125, 0.000244140625, 0.00048828125]);
          'MPU9150A' -> lists:nth(Gain + 1, [0.00006103515625, 0.0001220703125, 0.000244140625, 0.00048828125])
      end,
      #tm_accel{
          x = X * Coef,
          y = Y * Coef,
          z = Z * Coef
      }.
  
  %%
  %%  Gyroscope and temperature data.
  
negative.code:         Temp:16/little-signed,
          Gain:8
      >> = Telemetry,
      MPUCoefs = [7.6335878E-03, 1.5267176E-02, 3.0487805E-02, 6.0975610E-02],
      L3GCoefs = [1.5258789E-02, 3.0517578E-02, 6.1035156E-02, 6.1035156E-02],
      Coef = case Sensor of
          'MPU6000A' -> lists:nth(Gain + 1, MPUCoefs);
          'MPU9150A' -> lists:nth(Gain + 1, MPUCoefs);
          'L3GD20'   -> lists:nth(Gain + 1, L3GCoefs)
      end,
      #tm_gyro{
          x = X * Coef,
  