I'm testing my new sensor BNO085 and I want to determine the boat's course. I use the ready-made code from the examples (SH2_ROTATION_VECTOR - determining the course based on data from accelerometer, gyroscope and magnetometer). I get the result in quaternions, then I transform them into Eulerians and degrees - function below:
According to the documentation, the Y axis marked on the sensor points north (screen below), so if the sensor receives a result of 0, then north is where the Y axis points on the sensor?
No, the result will be 1+0i+0j+0k, top row in that table. A result of 0 is not valid, rotations represented as quaternions have magnitude 1, ie a^2+b^2+c^2+d^2 = 1, where a,b,c,d are the coefficients of 1,i,j,k
okey, so how interpet the result in euler and then in deegres from this function? For example, I have a 90 deegres and this is a East. So in which direction (which axis on sensor) is East?
Dealing with 3D angle representations always requires a cool head to get things right (or just try all the variants as there's only a finite number!)
At least with quaternions a rotation is relatively intuitive, the vector part of the quarternion gives the axis of rotation, the scalar part the angle (more exactly the cosine of half the angle)