Inertial Sensors in Swimming: Detection of Stroke Phases through 3D Wrist Trajectory.