I have trouble in understanding the schematic of the AR4 with axes (left bottom). The z0-axis is downwards, but the
results in the matrices R 0-2, etc to R 0-T have only positive values of z (last column)?
I also think there may be a problem at T20: the calc show atan(T16/T19). Should it not be atan(T19/T16)? I think the swapped x,y for atan2 is not applicable for atan. This also has implications at T24: should it not be T20+T21? This gives the correct value of J2, which should be 90 in an all zero situation in B4 - B9.