code: def mag_yaw(RAW_IMU, inclination, declination):
      '''estimate yaw from mag'''
      m = mag_rotation(RAW_IMU, inclination, declination)
      (r, p, y) = m.to_euler()
      y = degrees(y)
      if y < 0:
          y += 360
      return f mag_yaw(RAW_IMU, inclination, declination):
      '''estimate yaw from mag'''
      m = mag_rotation(RAW_IMU, inclination, declination)
      (r, p, y) = m.to_euler()
      y = degrees(y)
      if y < 0:
          y += 360
      return y
docs: estimate yaw from mag