Efficient Gait Phase Estimation and Trajectory Prediction in Wearable Devices Using a Dual-Stage Approach | Synapse