@@ -1571,9 +1571,11 @@ namespace gz
15711571 if (numBeamsLocked >= 3 )
15721572 {
15731573 // Enough rows for a unique least squares solution
1574- const auto svdDecomposition =
1575- beamBasis.topRows (numBeamsLocked).jacobiSvd (
1576- Eigen::ComputeThinU | Eigen::ComputeThinV);
1574+ const Eigen::MatrixXd svdMat =
1575+ beamBasis.topRows (numBeamsLocked).eval ();
1576+ using SvdT = Eigen::JacobiSVD<Eigen::MatrixXd>;
1577+ const SvdT svdDecomposition (svdMat,
1578+ Eigen::ComputeThinU | Eigen::ComputeThinV);
15771579
15781580 // Estimate DVL velocity mean and covariance in the reference frame
15791581 const Eigen::Vector3d velocityMeanInReferenceFrame =
@@ -1821,9 +1823,11 @@ namespace gz
18211823 if (numBeamsLocked >= 3 )
18221824 {
18231825 // Enough rows for a unique least squares solution
1824- const auto svdDecomposition =
1825- beamBasis.topRows (numBeamsLocked).jacobiSvd (
1826- Eigen::ComputeThinU | Eigen::ComputeThinV);
1826+ const Eigen::MatrixXd svdMat =
1827+ beamBasis.topRows (numBeamsLocked).eval ();
1828+ using SvdT = Eigen::JacobiSVD<Eigen::MatrixXd>;
1829+ const SvdT svdDecomposition (svdMat,
1830+ Eigen::ComputeThinU | Eigen::ComputeThinV);
18271831
18281832 // Estimate DVL velocity mean and covariance in the reference frame
18291833 const Eigen::Vector3d velocityMeanInReferenceFrame =
0 commit comments