anchor.diff:  
     end function get_rotation_from_cosines
   
  -  ! ********************************************************
  -  ! routine that returns the ang rate matrix (euler angles)
  -  ! ********************************************************
  -  function get_angrate_from_angles(theta) result(SMAT)
  -
  -    real(dp) :: theta(NUM_SPAT_DIM)    
  +
  +  !*******************************************************************!
  +  ! Returns the ang rate matrix from the supplied euler angles
  +  !
  +  ! Compute the 3-2-1 Euler angle rotation. The S matrix does not 
  +  ! depend on c3/s3, however we keep these as inputs in case we ever
  +  ! want to change the Euler sequence.
  +  !
  +  ! Input : theta of type VECTOR
  +  ! Output: SMAT  of type MATRIX
  +  ! 
  +  ! Ref: Section 2.3 Eq. 24/25 Hughes
  +  ! ******************************************************************!
  +  function get_angrate_from_angles_vec(thetain) result(SMAT)
  +
  +    type(vector) :: thetain
  +    real(dp)     :: theta(NUM_SPAT_DIM)    
       type(matrix) :: SMAT
  -    real(dp)                   :: c1, c2, c3, s1, s2, s3
  +
  +    ! convert to array
  +    theta = array(thetain)
  +
  +    ! call the function with array signature
  +    SMAT = get_angrate_from_angles_array(theta)
  +
  +  end function get_angrate_from_angles_vec
  +
  +  !*******************************************************************!
  +  ! Returns the ang rate matrix from the supplied euler angles
  +  !
  +  ! Compute the 3-2-1 Euler angle rotation. The S matrix does not 
  +  ! depend on c3/s3, however we keep these as inputs in case we ever
  +  ! want to change the Euler sequence.
  +  !
  +  ! Input : theta as an array
  +  ! Output: SMAT  of type MATRIX
  +  ! 
  +  ! Ref: Section 2.3 Eq. 24/25 Hughes
  +  ! ******************************************************************!
  +  function get_angrate_from_angles_array(theta) result(SMAT)
  +
  +    real(dp)     :: theta(NUM_SPAT_DIM)    
  +    type(matrix) :: SMAT
  +    real(dp)     :: c1, c2, c3, s1, s2, s3
   
       ! Compute the sin/cos of the Euler angles
       c1 = cos(theta(1))
  
positive.code: 
      SMAT = get_angrate_from_cosines(c1, c2, c3, s1, s2, s3)
  
    end function get_angrate_from_angles
  
    ! ********************************************************
    ! routine that returns the rotation matrix (euler angles)
    ! based on the sines and cosines of the euler angles
    ! ********************************************************
    function get_angrate_from_cosines(c1,c2,c3,s1,s2,s3) result(SMAT)
  
      real(dp), intent(in)       :: c1, c2, c3, s1, s2, s3
  
negative.code: !!$  ! routine that returns the rotation matrix (euler angles)
  !!$  ! based on the angles
  
  ! compiler threw ambiguity 
  ! error so I have commented out this impl for now and will explore
  ! later
  !!$  ! ********************************************************
  !!$  function get_rotation_from_state_vector(qr) result(CMAT)
  !!$
  