An AI-powered wearable system tracks the 3D movement of smart pills in the gut