A robust real-time gait event detection using wireless gyroscope and its application on normal and altered gaits