anchor.diff:        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      CALL BD_CrvExtractCrv(p%GlbRot,temp_glb,ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +!WRITE(*,*) 'temp_glb'
  +!WRITE(*,*) temp_glb
  +!WRITE(*,*) 'temp_ori'
  +!WRITE(*,*) temp3
      DO i=1,p%elem_total
          IF( i .EQ. 1) THEN
              k = 1
  
positive.code: 
     call BD_Input_extrapinterp( u, utimes, u_interp, t+p%dt, ErrStat2, ErrMsg2 )
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
                   
  !WRITE(*,*) 'x%q'
  !WRITE(*,*) x%q(:)
  !WRITE(*,*) 'x%dqdt'
  !WRITE(*,*) x%dqdt(:)
  !WRITE(*,*) 'OS%acc'
  !WRITE(*,*) OS_tmp%acc
  !WRITE(*,*) 'OS%xcc'
  !WRITE(*,*) OS_tmp%xcc
     ! GA2: prediction        
     CALL BD_TiSchmPredictorStep( x_tmp%q,x_tmp%dqdt,OS_tmp%acc,OS_tmp%xcc,             &
                                  p%coef,p%dt,x%q,x%dqdt,OtherState%acc,OtherState%xcc, &
  
negative.code:    INTEGER(IntKi)                             :: temp_id
     REAL(ReKi)                                 :: temp3(3)
     REAL(ReKi)                                 :: temp_p0(3)
     REAL(ReKi)                                 :: temp_ref(3)
     REAL(ReKi)                                 :: temp_root(3)
     REAL(ReKi)                                 :: temp_glb(3)
     TYPE(BD_InputType)                         :: u_tmp
     INTEGER(IntKi)                             :: ErrStat2                     ! Temporary Error status
  