anchor.diff:     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
  -   TYPE(BD_InputType)                                 :: u_tmp2
      INTEGER(IntKi)                                     :: ErrStat2   ! Temporary Error status
      CHARACTER(ErrMsgLen)                               :: ErrMsg2    ! Temporary Error message
      CHARACTER(*), PARAMETER                            :: RoutineName = 'BD_GA2'
  
positive.code:    ErrStat = ErrID_None
     ErrMsg  = ""
     
     
     
     IF(p%analysis_type == 2) THEN
         CALL BD_GA2( t, n, u, utimes, p, x, xd, z, OtherState, ErrStat, ErrMsg )
     ELSEIF(p%analysis_type == 1) THEN
  
negative.code:    call BD_Input_extrapinterp( u, utimes, u_interp, t+p%dt, ErrStat2, ErrMsg2 )
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
     CALL BD_UpdateDiscState( t, n, u_interp, p, x, xd, z, OtherState, ErrStat2, ErrMsg2 )
        call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
              
  ! Actuator
     IF( p%torq ) THEN
        CALL PitchActuator_SetBC(p, u_interp, xd)      
     ENDIF
  ! END Actuator
  
  