code: def DCM_update(IMU, ATT, MAG, GPS):
      '''implement full DCM system'''
      global dcm_state
      if dcm_state is None:
          dcm_state = DCM_State(ATT.Roll, ATT.Pitch, ATT.Yaw)
  
      mag   = Vector3(MAG.MagX, MAG.MagY, MAG.MagZ)
      gyro  = Vector3(IMU.GyrX, IMU.GyrY, IMU.GyrZ)
      accel = Vector3(IMU.AccX, IMU.AccY, IMU.AccZ)
      accel2 = Vector3(IMU.AccX, IMU.AccY, IMU.AccZ)
      dcm_state.update(gyro, accel, mag, GPS)
      return dcm_statf DCM_update(IMU, ATT, MAG, GPS):
      '''implement full DCM system'''
      global dcm_state
      if dcm_state is None:
          dcm_state = DCM_State(ATT.Roll, ATT.Pitch, ATT.Yaw)
  
      mag   = Vector3(MAG.MagX, MAG.MagY, MAG.MagZ)
      gyro  = Vector3(IMU.GyrX, IMU.GyrY, IMU.GyrZ)
      accel = Vector3(IMU.AccX, IMU.AccY, IMU.AccZ)
      accel2 = Vector3(IMU.AccX, IMU.AccY, IMU.AccZ)
      dcm_state.update(gyro, accel, mag, GPS)
      return dcm_state
docs: implement full DCM system