# Estimate central orientation of the first subject's wrist
Subject1Wrist <- subset(drill, Subject == 1 & Joint == "Wrist")
Qs <- as.Q4(Subject1Wrist[, 5:8])
mean(Qs)
# \donttest{
# Plot Subject 1's wrist measurements using the connection to rotation matrices
plot(Qs, col = c(1, 2, 3))
# }
# Translate the quaternion measurements into rotations and
# estimate the central orientation in terms of rotations
Rs <- as.SO3(Qs)
mean(Rs)
Run the code above in your browser using DataLab