1. A method comprising: affixing a plurality of prosthesis sensors to a lower limb prosthesis; affixing or connecting a plurality of EMG sensors to the prosthesis; determining, using a gait phase algorithm running on a processor, a gait phase based on an output of the prosthesis sensors; measuring signals from the plurality of EMG sensors; inputting the signals from the EMG sensors and information reflecting the gait phase to the processor; determining, using a locomotion mode algorithm running on the processor, a locomotion mode based on the information reflecting the gait phase and the signals from the EMG sensors; and providing the locomotion mode at the gait phase to an input of a controller of the lower-limb prosthesis, wherein the locomotion mode algorithm can determine a level walking mode, an obstacle mode, a stair ascent mode, a stair descent mode, an ipsi-turn mode, a contra-turn mode, and a standing mode.