I am working my way through the datasheet of a electronic sensor. This one has a build-in processor to do the 'orientation' math. I see that all the sensor data (Acceleration, Magnetometer, Gyroscope, Heading, Roll, etc.) is in three dimensions x,y and z. It also gives the Quaternion numbers in x,y,z and w.
What is the advantage of, or what does the extra dimension of a quaternion offer?
I did a search for quaternion on this forum and worked my way through the first ten pages but did not have the courage to work through all 213 pages.
As mentioned in the comments, the major engineering problem is gimbal lock. There are actually many other nice features of quaternions. For example, if you use quaternion feedback in an orientation controller, you get rid of the annoying wrapping of angles (going instantaneously from 0 to $2\pi$ or $-\pi$ to $\pi$ since angular charts are periodic). That quaternions don't have such a problem can be seen most easily by realizing the unit quaternion for a one dimensional rotation is simply $e^{i\theta}$, which is a smooth function of orientation.
Quaternions are more closely connected with physical rotation than angles. The direction cosine matrices commonly found in engineering texts are actually elements of a mathematical object called a Lie group. It turns out that the set of all unit quaternions (using quaternion multiplication) is another Lie group which is in some sense provides a natural set of parameters for rotation, since the unit quaternion group covers all rotations (this is actually why no gimbal lock). This means you can use quaternions more effectively to do things like estimate orientation from a set of vector measurements. See, for instance this paper.