You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See Note section in #177.
The mean method returns SMatrix (<: AbstractMatrix), but it's better to have a method for mean of rotation which returns Rotation.
The draft of this method is in src/mean.jl. (See also #90)
The text was updated successfully, but these errors were encountered:
We already have StatsBase.geomean that calculates the mean of rotations.
julia>import StatsBase
julia> r1 =QuatRotation(5,1,0,1)
3×3 QuatRotation{Float64} with indices SOneTo(3)×SOneTo(3)(QuaternionF64(0.96225, 0.19245, 0.0, 0.19245)):0.925926-0.370370.07407410.370370.851852-0.370370.07407410.370370.925926
julia> r2 =QuatRotation(6,1,0.2,0)
3×3 QuatRotation{Float64} with indices SOneTo(3)×SOneTo(3)(QuaternionF64(0.985861, 0.16431, 0.032862, 0.0)):0.997840.01079910.06479480.01079910.946004-0.323974-0.06479480.3239740.943844
julia> r3 =QuatRotation(8,0,0.1,2)
3×3 QuatRotation{Float64} with indices SOneTo(3)×SOneTo(3)(QuaternionF64(0.970071, 0.0, 0.0121259, 0.242518)):0.882076-0.4705190.0235260.4705190.882370.00588149-0.0235260.005881490.999706
julia> StatsBase.geomean([r1,r2,r3])
3×3 RotationVec{Float64} with indices SOneTo(3)×SOneTo(3)(0.239999, 0.0301774, 0.29325):0.957068-0.2826610.0642240.2898160.929063-0.2298880.005312260.2386320.971096
We can implement more efficient methods into this function as a package extension.
hyrodium
changed the title
Add mean_rotation to calculate mean of rotations (returns rotation)
Add more geomean methods for efficient calculation
Apr 13, 2024
See Note section in #177.
The
mean
method returnsSMatrix
(<: AbstractMatrix
), but it's better to have a method for mean of rotation which returnsRotation
.The draft of this method is in
src/mean.jl
. (See also #90)The text was updated successfully, but these errors were encountered: