code: function (yaw, pitch, roll) {
      
      var Rx, Ry, Rz;
      if (roll == 0) Rx = [[1,0,0],[0,1,0],[0,0,1]];
      else Rx = [[1, 0, 0], [0, Math.cos(roll), Math.sin(roll)], [0, -Math.sin(roll), Math.cos(roll)]];
      if (pitch == 0) Ry = [[1,0,0],[0,1,0],[0,0,1]];
      else Ry = [[Math.cos(pitch), 0, -Math.sin(pitch)], [0, 1, 0], [Math.sin(pitch), 0, Math.cos(pitch)]];
      if (yaw == 0) Rz = [[1,0,0],[0,1,0],[0,0,1]];
      else Rz = [[Math.cos(yaw), Math.sin(yaw), 0], [-Math.sin(yaw), Math.cos(yaw), 0], [0, 0, 1]];
      
      var R = numeric.dotMMsmall(Ry,Rz);
      R = numeric.dotMMsmall(Rx,R);
      return R;
  }
docs: yawPitchRoll2Rzyx computes the rotation matrix from ZY'X'' rotation angles