code: def expected_mag(RAW_IMU, ATTITUDE, inclination, declination):
      '''return expected mag vector'''
      m_body = Vector3(RAW_IMU.xmag, RAW_IMU.ymag, RAW_IMU.zmag)
      field_strength = m_body.length()
  
      m = rotation(ATTITUDE)
  
      r = Matrix3()
      r.from_euler(0, -radians(inclination), radians(declination))
      m_earth = r * Vector3(field_strength, 0, 0)
  
      return m.transposed() * m_eartf expected_mag(RAW_IMU, ATTITUDE, inclination, declination):
      '''return expected mag vector'''
      m_body = Vector3(RAW_IMU.xmag, RAW_IMU.ymag, RAW_IMU.zmag)
      field_strength = m_body.length()
  
      m = rotation(ATTITUDE)
  
      r = Matrix3()
      r.from_euler(0, -radians(inclination), radians(declination))
      m_earth = r * Vector3(field_strength, 0, 0)
  
      return m.transposed() * m_earth
docs: return expected mag vector