Front-crawl swimming: detection of the stroke phases through 3D wrist trajectory using intertial sensors