AnalyticalGraphicsInc/cesium — pull request #1342 by mramato (2013-12-16 15:02:53+00:00)
Title: Quaternion confusion

So this has been a problem ever since 3004c02e5c8a4a8ea45bf1bf65252ebbaf419489. The easiest way to see the issue is to load [LotsOfSensors](http://localhost:8080/Apps/CesiumViewer/index.html?source=Gallery/LotsOfSensors.czml) and then scrub all the way to the beginning of the timeline. This causes the orientation to get messed up. There are multiple issues here.

First, there is an extra call to `Quaternion.conjugate` at the end of `Quaternion.unpackInterpolationResult`. Therefore, whenever you sampled a quaternion you got a different answer than if you landed on a sample directly (as you do at the very beginning of the timeline in the Lots of Sensors example). However, you would expect the behavior to be the opposite (only correct when we are directly on a sample time and wrong when interpolating). This indicates that there was another bad conjugation somewhere else that was causing two wrongs to make a right.

It turns out that 3004c02e5c8a4a8ea45bf1bf65252ebbaf419489 causes an implicit conjugation of the Quaternion in `Matrix3.fromQuaternion`. @kring wasn't sure if this was correct or not (though @bagnell says it is definitely intentional).

Long story short (too late) this pull fixes the current issue and a future PR can change the behavior of `Matrix3.fromQuaternion` if desired.

CC @fstoner @pjcozzi