Skip to main content
. 2022 Jan 6;22(2):418. doi: 10.3390/s22020418
Algorithm 1 The proposed localization strategy.

Input:umj and vmj where j∈[1,25].

Output:um and vm.

Initialization: Left/right foot horizontal coordinates α/β and the feet vertical coordinate γ.

α=∑um15,um20,um21,um22#um15,um20,um21,um22          β=∑um12,um23,um24,um25#um12,um23,um24,um25          γ={vm12,vm15,vm20,vm21,vm22,vm23,vm24,vm25}

  • 1:

    switch true do

  • 2:

        case α≠∅∧β≠∅    then   um=12∑α#α+∑β#β and Fmu=1.

▹ Both feet joints are available
  • 3:

        case α≠∅∧um11≠∅    then   um=12∑α#α+um11 and Fmu=2.

▹ Left foot and right knee joints are available
  • 4:

        case um14≠∅∧β≠∅    then   um=12um14+∑β#β and Fmu=2.

▹ Left knee and right foot joints are available
  • 5:

        case um11≠∅∧um14≠∅    then   um=12um11+um14 and Fmu=2.

▹ Both knees’ joints are available
  • 6:

        case um10≠∅∧um14≠∅    then   um=12um10+um14 and Fmu=2.

▹ Right hip and left knee joints are available
  • 7:

        case um11≠∅∧um13≠∅    then   um=12um11+um13 and Fmu=2.

▹ Right knee and left hip joints are available
  • 8:

        case um10≠∅∧um13≠∅    then   um=12um10+um13 and Fmu=2.

▹ Hip’s joints are available
  • 9:

        case um2≠∅∧um9≠∅    then   um=12um2+um9 and Fmu=2.

▹ Torso’s joints are available
  • 10:

        case α≠∅∨β≠∅    then   um=∑α,β#α,β and Fmu=2.

▹ Consider any available feet joints
  • 11:

        otherwise   um=∅ and Fmu=0.

  • 12:

    end switch

  • 13:

    switch true do

  • 14:

        case γ≠∅    then   vm=∑γ#γ and Fmv=1.

▹ Consider any available feet joints
  • 15:

        case vm2≠∅∧vm9≠∅    then   vm=vm9+(0.85/0.6)vm2−vm9 and Fmv=2.

▹ Torso’s joints are available
  • 16:

        otherwise   vm=∅ and Fmv=0.

  • 17:

    end switch