anchor.diff:        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )   
      CALL BD_CopyInput(u, u_tmp, MESH_NEWCOPY, ErrStat2, ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +   CALL BD_CopyInput(u, u_tmp2, MESH_NEWCOPY, ErrStat2, ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      ! Actuator
      IF( .FALSE.) THEN
          temp_R(:,:) = MATMUL(u%RootMotion%Orientation(:,:,1),TRANSPOSE(u%HubMotion%Orientation(:,:,1)))
  
positive.code:    TYPE(BD_ContinuousStateType)                       :: x_tmp      ! Holds temporary modification to x
     TYPE(BD_OtherStateType     )                       :: OS_tmp     ! Holds temporary modification to x
     TYPE(BD_InputType)                                 :: u_interp   ! interpolated value of inputs
     INTEGER(IntKi)                                     :: ErrStat2   ! Temporary Error status
     CHARACTER(ErrMsgLen)                               :: ErrMsg2    ! Temporary Error message
     CHARACTER(*), PARAMETER                            :: RoutineName = 'BD_GA2'
     REAL(ReKi):: temp_3(3)
     INTEGER(IntKi)                                     :: i
  
     ! Initialize ErrStat
  
negative.code:          call cleanup()
           return
        end if
  
     call BD_Input_extrapinterp( u, utimes, u_interp, t+p%dt, ErrStat2, ErrMsg2 )
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
     CALL BD_CopyInput( u_interp,u_tmp2, MESH_NEWCOPY, ErrStat2, ErrMsg2)
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
  ! Actuator
     IF( .FALSE.) THEN
         temp_R(:,:) = MATMUL(u_interp%RootMotion%Orientation(:,:,1),TRANSPOSE(u_interp%HubMotion%Orientation(:,:,1)))
         temp_cc(:) = EulerExtract(temp_R)
         temp = 1.0D0/(p%pitchJ + p%pitchC*p%dt + p%pitchK*p%dt*p%dt)
         temp22(:,:) = 0.0D0
         temp22(1,1) = p%pitchJ + p%pitchC*p%dt
         temp22(1,2) = p%pitchJ * p%dt
         temp22(2,1) = -p%pitchK * p%dt
         temp22(2,2) = p%pitchJ
         temp22(:,:) = temp22(:,:) / temp
  
         temp2(:) = 0.0D0
         temp2(1) = temp22(1,1)*xd%thetaP + temp22(1,2)*xd%thetaPD + &
            temp22(1,2)*(p%pitchK*p%dt/p%pitchJ)*(-temp_cc(3))
         temp2(2) = temp22(2,1)*xd%thetaP + temp22(2,2)*xd%thetaPD + &
            temp22(2,2)*(p%pitchK*p%dt/p%pitchJ)*(-temp_cc(3))
         xd%thetaP = temp2(1)
         xd%thetaPD= temp2(2)
  
         temp_thetaP = xd%thetaP
         temp_omegaP = xd%thetaPD
         temp_alphaP = -(p%pitchK/p%pitchJ) * xd%thetaP - (p%pitchC/p%pitchJ) * xd%thetaPD + &
            (p%pitchK/p%pitchJ) * (-temp_cc(3))
         temp_cc(3) = -temp_thetaP
         temp_R(:,:) = EulerConstruct(temp_cc)
         u_interp%RootMotion%Orientation(:,:,1) = MATMUL(temp_R,u_tmp2%HubMotion%Orientation(:,:,1))
         u_interp%RootMotion%RotationVel(:,1) = u_tmp2%RootMotion%RotationVel(:,1) - &
           temp_omegaP * u_tmp2%RootMotion%Orientation(3,1:3,1)
         u_interp%RootMotion%RotationAcc(:,1) = u_tmp2%RootMotion%RotationAcc(:,1) - &
           temp_alphaP * u_tmp2%RootMotion%Orientation(3,1:3,1)
     ENDIF
  ! END Actuator
  
     ! GA2: prediction        
     CALL BD_TiSchmPredictorStep( x_tmp%q,x_tmp%dqdt,OS_tmp%acc,OS_tmp%xcc,             &
  