anchor.diff:       module procedure set_body_state
     end interface set_state
   
  +  !------------------------------------------------------------------
  +  ! a common interface for different ways of getting rotation matrix
  +  ! get_rotation_from_angles -- > user supplies theta(3)
  +  ! get_rotation_from_cosines -- > use supplies direction cosines and sines
  +  ! get_rotation_from_state_vector --> compiler threw ambiguity error, so I have commented this impl
  +  !------------------------------------------------------------------
  +  interface get_rotation
  +     module procedure get_rotation_from_angles, get_rotation_from_cosines
  +     ! get_rotation_from_state_vector
  +  end interface get_rotation
  +
   contains
   
     !****************************************************
  -  ! Takes the body and updates/sets the state variables
  +  ! Takes the body (alpha) and updates/sets the state variables
     !****************************************************
     subroutine set_body_state(q, qdot, alpha)
   
  
positive.code:     alpha%c  = mass*re
  
      ! reaction force 
      alpha%fr = mass*GRAV
  
      ! reaction torque
      alpha%gr = alpha%J*alpha%omega_dot
  
      !   call print_body(alpha)
  
  
negative.code: 
      call set_state(q, qdot, alpha)
  
      ! make a local copy
      theta = q(4:6)
  
      ! rotation and rate matrices
  