A scaling algorithm for the generation of jerk-limited trajectories in the operational space