Skip to main content

rotation_mean

Function rotation_mean 

Source
pub fn rotation_mean(
    rotations: &[Rotation3],
    weights: Option<&[f64]>,
) -> Result<Rotation3, ErrorsJSL>
Expand description

The mean of rotations (SciPy’s Rotation.mean): the unit quaternion maximising Σ wᵢ (q · qᵢ)², the eigenvector of the largest eigenvalue of Σ wᵢ qᵢ qᵢᵀ (Markley et al.). It minimises the weighted sum of squared chordal distances ‖R − Rᵢ‖², and is unaffected by the sign ambiguity q ~ −q.