Software for tracking swimming using a smartphone