Skip to main content
. 2018 Jan 13;18(1):212. doi: 10.3390/s18010212
Algorithm: The Algorithm for SSMA Calculation
//The data acquisition algorithm is used to extract all sensor data;
Generate Date List, Status list;
Get all the date points  pi(g,a,m,q), and put them in the Date List;
Get all the status values ai, and put them in the Status list;
K=(p1, p2,p3,p4);
i=1, 2, 3, 4;
For j = 0 to Date List.num do
  Start the timer;
  Send pi to;
If i=4, wait until the time end and get back;
end If;
Update the K;
End
//The calculation for SSMA
Generate Date List, Status list;
Get all the date points K, and put them in the Date List;
Get the status value K0 in K, and put it in the Status list;
Put the default status value m in the Status list;
If K0=m, decode the pi, and save it to the queue, save the initial data K;
If i=1, 2, get pi to calculate the angel of movable arm, and save it to Date List;
If i=2, 3, get pi to calculate the steering angel, and save it to Date List;
If i=3, 4, get pi to calculate the swing angel, and save it to Date List;
 Get all them out including p3 to calculate SSMA, and save it to Date List;
End If
Update the K, Update SSMA;
End.