9 static inline double kalman_gain(
double var1,
double var2) {
return var1 / (var1 + var2); }
15 return (1.0 / (std::sqrt(var) * std::sqrt(2.0 * M_PI))) *
16 std::exp(-((x - u) * (x - u)) / (2.0 * var));
23 static double normalizeDavid(
const double newMean,
const double mean1,
double var1,
24 const double mean2,
double var2) {
29 double prob_at_newMean =
sqrt(
pow(prob1_at_newMean, 2) +
pow(prob2_at_newMean, 2));
31 double newVar = std::pow(1.0 / (prob_at_newMean *
sqrt(2.0 * M_PI)), 2);
34 newVar = std::min(newVar, 1e3);
35 newVar = std::max(newVar, 1e-8);
73 double mean2 = (p2 - p1).
length();
Quaternion normalized() const
Quaternion slerp(const Quaternion &q, const tf2Scalar &t) const
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)