  Even though it is well known that physical exercises have numerous emotional
and physical health benefits, maintaining a regular exercise routine is quite
challenging. Fortunately, there exist technologies that promote physical
activity. Nonetheless, almost all of these technologies only target a narrow
set of physical activities (e.g., either running or walking but not both) and
are only applicable either in indoor or in outdoor environments, but do not
work well in both environments. This paper introduces a real-time segmentation
and classification algorithm that recognizes physical exercises and that works
well in both indoor and outdoor environments. The proposed algorithm achieves a
95\% classification accuracy for five indoor and outdoor exercises, including
segmentation error. This accuracy is similar or better than previous works that
handled only indoor workouts and those use a vision-based approach. Moreover,
while comparable machine learning-based approaches need a lot of training data,
the proposed correlation-based method needs one sample of motion data of each
target exercises.
