Template Function beluga::detail::weighted_average_quaternion
Defined in File estimation.hpp
Function Documentation
-
template<class QuaternionRange, class WeightsRange, class Scalar = typename ranges::range_value_t<QuaternionRange>::Scalar>
Eigen::Quaternion<Scalar> beluga::detail::weighted_average_quaternion(const QuaternionRange &quaternions, const WeightsRange &normalized_weights) Given a range with quaternions and a normalized range of weights, compute the weighted average quaternion.
- Template Parameters:
QuaternionRange – A sized range type whose value type is
Eigen::Quaternion<Scalar>
.WeightsRange – A sized range type whose value type is
Scalar
.Scalar – The scalar type, matching those of the weights.
- Parameters:
quaternions – Range of quaternions to compute the weighted average from.
normalized_weights – Range of normalized weights. With matching indices wrt
quaternions
. Non-normalized weights will yield incorrect results.
- Returns:
The average quaternion.