Magnetic tracking of gastrointestinal motility