Feature #2056
Calculate scalar angle between orientations
Status: | New | Start date: | 10/10/2014 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Software | |||
Target version: | rci0.5 |
Description
OrientationPtr o1 = Orientation::fromEulerAngles(0, M_PI/4.0, 0); OrientationPtr o2 = Orientation::fromEulerAngles(0, -M_PI/8.0, 0); boost::math::quaternion<double> q1Conj = boost::math::quaternion<double>(o1->asQuaternion().R_component_1(), -1*o1->asQuaternion().R_component_2(), -1*o1->asQuaternion().R_component_3(), -1*o1->asQuaternion().R_component_4()); boost::math::quaternion<double> result = o2->asQuaternion() * q1Conj; cout << 2*acos(result.R_component_1()) << endl;