Improved accuracy with an optimized plug-in-gait protocol