28template<
typename Derived>
34 for (Eigen::Index i = 0; i < D_LTDL_Q.rows(); i++)
50template<
typename DerivedAFix1,
typename DerivedAFix2,
typename DerivedAFloat,
typename DerivedQ>
51bool differenceTest(
const Eigen::MatrixBase<DerivedAFix1>& aFix1,
const Eigen::MatrixBase<DerivedAFix2>& aFix2,
52 const Eigen::MatrixBase<DerivedAFloat>& aFloat,
const Eigen::MatrixBase<DerivedQ>& Qa,
double criticalValue)
54 static_assert(DerivedAFix1::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix1::ColsAtCompileTime == 1);
55 static_assert(DerivedAFix2::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix2::ColsAtCompileTime == 1);
56 static_assert(DerivedAFloat::ColsAtCompileTime == Eigen::Dynamic || DerivedAFloat::ColsAtCompileTime == 1);
60 INS_ASSERT_USER_ERROR(aFix1.rows() == aFix2.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
61 INS_ASSERT_USER_ERROR(aFix1.rows() == aFloat.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
72bool differenceTest(
double sqNormFix1,
double sqNormFix2,
double criticalValue);
82template<
typename DerivedAFix1,
typename DerivedAFix2,
typename DerivedAFloat,
typename DerivedQ>
83bool ratioTest(
const Eigen::MatrixBase<DerivedAFix1>& aFix1,
const Eigen::MatrixBase<DerivedAFix2>& aFix2,
84 const Eigen::MatrixBase<DerivedAFloat>& aFloat,
const Eigen::MatrixBase<DerivedQ>& Qa,
double mu)
86 static_assert(DerivedAFix1::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix1::ColsAtCompileTime == 1);
87 static_assert(DerivedAFix2::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix2::ColsAtCompileTime == 1);
88 static_assert(DerivedAFloat::ColsAtCompileTime == Eigen::Dynamic || DerivedAFloat::ColsAtCompileTime == 1);
92 INS_ASSERT_USER_ERROR(aFix1.rows() == aFix2.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
93 INS_ASSERT_USER_ERROR(aFix1.rows() == aFloat.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
104bool ratioTest(
double sqNormFix1,
double sqNormFix2,
double mu);
122template<
typename DerivedAFix1,
typename DerivedAFix2,
typename DerivedAFloat,
typename DerivedQ,
typename DerivedD>
124 const Eigen::MatrixBase<DerivedAFloat>& aFloat,
const Eigen::MatrixBase<DerivedQ>& Qa,
125 const Eigen::MatrixBase<DerivedD>& D_LTDL_Q)
132 if (Pf_ILS <= Pf) {
return true; }
136 return ratioTest(aFix1, aFix2, aFloat, Qa, mu);
148template<
typename DerivedD>
149bool fixedFailureRateRatioTest(
double Pf,
double sqNormFix1,
double sqNormFix2,
size_t nAmb,
const Eigen::MatrixBase<DerivedD>& D_LTDL_Q,
bool validateBootstrappedSuccessRate =
true)
156 if (validateBootstrappedSuccessRate && Pf_ILS <= Pf) {
return true; }
160 return ratioTest(sqNormFix1, sqNormFix2, mu);
171template<
typename DerivedAFix1,
typename DerivedAFix2,
typename DerivedAFloat,
typename DerivedQ>
172bool projectorTest(
const Eigen::MatrixBase<DerivedAFix1>& aFix1,
const Eigen::MatrixBase<DerivedAFix2>& aFix2,
173 const Eigen::MatrixBase<DerivedAFloat>& aFloat,
const Eigen::MatrixBase<DerivedQ>& Qa,
double mu)
175 static_assert(DerivedAFix1::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix1::ColsAtCompileTime == 1);
176 static_assert(DerivedAFix2::ColsAtCompileTime == Eigen::Dynamic || DerivedAFix2::ColsAtCompileTime == 1);
177 static_assert(DerivedAFloat::ColsAtCompileTime == Eigen::Dynamic || DerivedAFloat::ColsAtCompileTime == 1);
181 INS_ASSERT_USER_ERROR(aFix1.rows() == aFix2.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
182 INS_ASSERT_USER_ERROR(aFix1.rows() == aFloat.rows(),
"Parameter 'aFix1' needs to have the same size as 'aFix2' and 'aFloat'");
184 double proj = (aFix2 - aFix1).transpose() * Qa.inverse() * (aFloat - aFix1);
#define INS_ASSERT_USER_ERROR(_EXP, _MSG)
Assert function with message.
Utility class for logging to console and file.
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
bool fixedFailureRateRatioTest(double Pf, const Eigen::MatrixBase< DerivedAFix1 > &aFix1, const Eigen::MatrixBase< DerivedAFix2 > &aFix2, const Eigen::MatrixBase< DerivedAFloat > &aFloat, const Eigen::MatrixBase< DerivedQ > &Qa, const Eigen::MatrixBase< DerivedD > &D_LTDL_Q)
Ratio test with a fixed-failure rate for ambiguity resolution, see NAV::AmbiguityResolutionParameters...
bool differenceTest(double sqNormFix1, double sqNormFix2, double criticalValue)
Difference test for the ambiguity resolution see NAV::AmbiguityResolutionParameters::ValidationAlgori...
bool ratioTest(double sqNormFix1, double sqNormFix2, double mu)
Ratio test for the ambiguity resolution see NAV::AmbiguityResolutionParameters::ValidationAlgorithm::...
double successRateBootstrapping(const Eigen::MatrixBase< Derived > &D_LTDL_Q)
Calculates the bootstrapped success rate.
bool projectorTest(const Eigen::MatrixBase< DerivedAFix1 > &aFix1, const Eigen::MatrixBase< DerivedAFix2 > &aFix2, const Eigen::MatrixBase< DerivedAFloat > &aFloat, const Eigen::MatrixBase< DerivedQ > &Qa, double mu)
Projector test for the ambiguity resolution see NAV::AmbiguityResolutionParameters::ValidationAlgorit...
double criticalValueFailureRateLookup(double Pf, double Pf_ILS, size_t nAmb)
Look-up table for the critical value µ, depending on failure rate Pf_ILS.
DerivedA::Scalar squaredNormVectorMatrix(const Eigen::MatrixBase< DerivedA > &a, const Eigen::MatrixBase< DerivedQ > &Q)
Calculates the squared norm of the vector and matrix.
double normalCDF(double value)
Calculates the cumulative distribution function (CDF) of the standard normal distribution.