anchor.diff:           v(2) =  DCM(3,1) - DCM(1,3) ! skewSym(3,1)
            v(3) = -DCM(2,1) + DCM(1,2) !-skewSym(2,1)
    
  -         indx_max = 1
  -         do i=2,3
  -            if ( abs(v(i)) > abs(v(indx_max)) ) indx_max = i
  -         end do
  +         indx_max = maxloc( abs(v), 1 )  ! find component with largest magnitude
            
            if ( .not. EqualRealNos( sign(1.0_ReKi,v(indx_max)), sign(1.0_ReKi,logMap(indx_max)) )) logMap = -logMap
            
  
positive.code: !! \f}
  !! where \f$v\f$ is the skew-symmetric matrix associated with the unit-length eigenvector of \f$\Lambda\f$ associated with the eigenvalue 1.
  !! However, this equation has numerical issues near \f$\theta = \pi\f$, so for \f$\theta > 3.1\f$  we instead implement
  !! \f{equation}{
  !!\lambda_1 = \pm \theta\sqrt{ \frac{\left(1 + \Lambda_{11} - \Lambda_{22} - \Lambda_{33}\right)}{2\left(1-\cos\theta\right)}   } \\
  !!\lambda_2 = \pm \theta\sqrt{ \frac{\left(1 + \Lambda_{22} - \Lambda_{11} - \Lambda_{33}\right)}{2\left(1-\cos\theta\right)}   } \\
  !!\lambda_3 = \pm \theta\sqrt{ \frac{\left(1 + \Lambda_{33} - \Lambda_{11} - \Lambda_{22}\right)}{2\left(1-\cos\theta\right)}   }
  !! \f}
  !! and use \f$\Lambda - \Lambda^T\f$ to choose the appropriate signs. 
  !!   
  !! This routine is the inverse of DCM_exp (nwtc_num::dcm_exp). \n
  
negative.code:       IF ( theta > 3.1_ReKi ) THEN  ! theta/(2*sin(theta)) blows up quickly as theta approaches pi, 
           ! so I'm putting a pretty large tolerance on pi here, and using a different equation to find the solution near pi
                       
           logMap(1) = 1.0_ReKi + DCM(1,1) - DCM(2,2) - DCM(3,3);
           logMap(2) = 1.0_ReKi - DCM(1,1) + DCM(2,2) - DCM(3,3);
           logMap(3) = 1.0_ReKi - DCM(1,1) - DCM(2,2) + DCM(3,3);
               
           indx_max = maxloc( abs(logMap), 1 )
               
           divisor = sqrt(abs( logMap(indx_max) *  2.0_ReKi*(1.0_ReKi - cosTheta)  )) / theta  ! 2*(1-cosTheta)/theta^2 * abs(lambda(indx))
           if (indx_max == 1) then
             !logMap(1) = 1.0 + DCM(1,1) - DCM(2,2) - DCM(3,3)               ! 2*(1-cosTheta)/theta^2 * lambda(1) * lambda(1)
              logMap(2) = DCM(1,2) + DCM(2,1)                                ! 2*(1-cosTheta)/theta^2 * lambda(1) * lambda(2)
              logMap(3) = DCM(1,3) + DCM(3,1)                                ! 2*(1-cosTheta)/theta^2 * lambda(1) * lambda(3)
           elseif (indx_max == 2) then
              logMap(1) = DCM(1,2) + DCM(2,1)                                ! 2*(1-cosTheta)/theta^2 * lambda(2) * lambda(1)
             !logMap(2) = 1.0 - DCM(1,1) + DCM(2,2) - DCM(3,3)               ! 2*(1-cosTheta)/theta^2 * lambda(2) * lambda(2)
              logMap(3) = DCM(2,3) + DCM(3,2)                                ! 2*(1-cosTheta)/theta^2 * lambda(2) * lambda(3)
           else
              logMap(1) = DCM(1,3) + DCM(3,1)                                ! 2*(1-cosTheta)/theta^2 * lambda(3) * lambda(1)
              logMap(2) = DCM(2,3) + DCM(3,2)                                ! 2*(1-cosTheta)/theta^2 * lambda(3) * lambda(2)
             !logMap(3) = 1.0 - DCM(1,1) - DCM(2,2) + DCM(3,3)               ! 2*(1-cosTheta)/theta^2 * lambda(3) * lambda(3)
           end if
           logMap = logMap / divisor                                         ! lambda * sign(lambda(indx_max))
           
           ! at this point we may have the wrong sign for logMap (though if theta==pi, it doesn't matter because we can change it in the DCM_setLogMapforInterp() routines)
           ! we'll do a little checking to see if we should change the sign:
           
  