Real time event-based segmentation to classify locomotion activities through a single inertial sensor