9 #include <boost/test/unit_test.hpp>
14 namespace tt = boost::test_tools;
32 Vector3D direction{sqrt(5. / 22.), 3. * sqrt(2. / 55.), 7. / sqrt(110.)};
35 parameters <<
position[0], position[1], position[2],
time, direction[0],
36 direction[1], direction[2], qop;
40 Covariance covariance = Covariance::Identity();
41 Jacobian jacobian = 2. * Jacobian::Identity();
42 FreeMatrix transportJacobian = 3. * FreeMatrix::Identity();
44 derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
49 derivatives, jacobianLocalToGlobal, direction);
52 BOOST_TEST(covariance != Covariance::Identity());
53 BOOST_TEST(jacobian != 2. * Jacobian::Identity());
54 BOOST_TEST(transportJacobian == FreeMatrix::Identity());
55 BOOST_TEST(derivatives == FreeVector::Zero());
56 BOOST_TEST(jacobianLocalToGlobal != 4. * BoundToFreeMatrix::Identity());
57 BOOST_TEST(direction ==
58 Vector3D(sqrt(5. / 22.), 3. * sqrt(2. / 55.), 7. / sqrt(110.)));
61 covariance = Covariance::Identity();
62 jacobian = 2. * Jacobian::Identity();
63 transportJacobian = 3. * FreeMatrix::Identity();
64 derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
65 jacobianLocalToGlobal = 4. * BoundToFreeMatrix::Identity();
70 transportJacobian, derivatives,
71 jacobianLocalToGlobal, parameters, *
surface);
73 BOOST_TEST(covariance != Covariance::Identity());
74 BOOST_TEST(jacobian != 2. * Jacobian::Identity());
75 BOOST_TEST(transportJacobian == FreeMatrix::Identity());
76 BOOST_TEST(derivatives == FreeVector::Zero());
77 BOOST_TEST(jacobianLocalToGlobal != 4. * BoundToFreeMatrix::Identity());
78 BOOST_TEST(parameters == startParameters);
82 covariance, jacobian, transportJacobian, derivatives,
83 jacobianLocalToGlobal, parameters,
false, 1337.);
84 BOOST_TEST(!std::get<0>(curvResult).covariance().has_value());
85 BOOST_TEST(std::get<2>(curvResult) == 1337.);
88 covariance = Covariance::Identity();
89 jacobian = 2. * Jacobian::Identity();
90 transportJacobian = 3. * FreeMatrix::Identity();
91 derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
92 jacobianLocalToGlobal = 4. * BoundToFreeMatrix::Identity();
96 derivatives, jacobianLocalToGlobal,
97 parameters,
true, 1337.);
98 BOOST_TEST(std::get<0>(curvResult).covariance().has_value());
99 BOOST_TEST(*(std::get<0>(curvResult).covariance()) != Covariance::Identity());
100 BOOST_TEST(std::get<1>(curvResult) != 2. * Jacobian::Identity());
101 BOOST_TEST(std::get<2>(curvResult) == 1337.);
105 tgContext, covariance, jacobian, transportJacobian, derivatives,
106 jacobianLocalToGlobal, parameters,
false, 1337., *
surface);
107 BOOST_TEST(!std::get<0>(boundResult).covariance().has_value());
108 BOOST_TEST(std::get<2>(boundResult) == 1337.);
111 covariance = Covariance::Identity();
112 jacobian = 2. * Jacobian::Identity();
113 transportJacobian = 3. * FreeMatrix::Identity();
114 derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
115 jacobianLocalToGlobal = 4. * BoundToFreeMatrix::Identity();
119 tgContext, covariance, jacobian, transportJacobian, derivatives,
120 jacobianLocalToGlobal, parameters,
true, 1337., *
surface);
121 BOOST_TEST(std::get<0>(boundResult).covariance().has_value());
122 BOOST_TEST(*(std::get<0>(boundResult).covariance()) !=
123 Covariance::Identity());
124 BOOST_TEST(std::get<1>(boundResult) != 2. * Jacobian::Identity());
125 BOOST_TEST(std::get<2>(boundResult) == 1337.);