anchor.diff:                     temp6(1:3) = OS_tmp%Acc(temp_id+1:temp_id+3)
                      temp6(4:6) = OS_tmp%Acc(temp_id+4:temp_id+6)
                  ENDIF
  -                   temp6(:) = MATMUL(MoTens,temp6)
  -                   y%BldMotion%TranslationAcc(1:3,temp_id2) = temp6(1:3)
  -                   y%BldMotion%RotationAcc(1:3,temp_id2) = temp6(4:6)
  +                   y%BldMotion%TranslationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,temp6(1:3))
  +                   y%BldMotion%RotationAcc(1:3,temp_id2) = MATMUL(p%GlbRot,temp6(4:6))
              ENDDO
          ENDDO
          CALL BD_DynamicSolutionForce(p%uuN0,x_tmp%q,x_tmp%dqdt,OS_tmp%Acc,                              &
  
positive.code:    CALL BD_CopyOtherState(OtherState, OS_tmp, MESH_NEWCOPY, ErrStat, ErrMsg)
     CALL BD_CopyInput(u, u_tmp, MESH_NEWCOPY, ErrStat, ErrMsg)
  
     CALL BD_MotionTensor(p%GlbRot,p%GlbPos,MoTens,0)
     DO i=1,p%elem_total
         DO j=1,p%node_elem
             temp_id = ((i-1)*(p%node_elem-1)+j-1)*p%dof_node
  
negative.code:                                     temp_Force)
     ENDIF
  
     temp6(:) = 0.0D0
     IF(p%analysis_type .EQ. 2) THEN
         temp6(1:6) = -OS_tmp%Acc(1:6)
         y%ReactionForce%Force(1:3,1) = MATMUL(p%GlbRot,temp6(1:3))
         y%ReactionForce%Moment(1:3,1) = MATMUL(p%GlbRot,temp6(4:6))
     ENDIF
     DO i=1,p%node_total
         temp_id = (i-1)*p%dof_node
         temp6(:) = 0.0D0
         temp6(:) = temp_Force(temp_id+1:temp_id+6)
         y%BldForce%Force(1:3,i) = MATMUL(p%GlbRot,temp6(1:3))
         y%BldForce%Moment(1:3,i) = MATMUL(p%GlbRot,temp6(4:6))
     ENDDO
  
  
     CALL BD_DestroyInput(u_tmp, ErrStat, ErrMsg)
     CALL BD_DestroyContState(x_tmp, ErrStat, ErrMsg )
  