Measuring gait quality in Parkinson’s disease through real-time gait phase recognition