Pre-impact detection algorithm to identify tripping events using wearable sensors