A Smartphone-based System for Clinical Gait Assessment