Missing w of Quaterion in Sensor Fusion

edited August 2018 in JavaScript

Hi @Eric , @schuster ,

I'd like to rotate and move a cube in WebGL according to the motion of a MetaMotionC (1.3.7). I'm using NodeJS SDK on Linux. I stream the data to a chrome using client/server socket.io

I'm mixing this Android tutorial with it's magic formula with the Python code of @schuster in his SensorFusion question:
https://mbientlab.com/community/discussion/2594/sensor-fusion-question

Here is my NodeJS code:
https://gist.github.com/JpEncausse/23066976905cf15a5f7cfc5cabdc8a56

1) As you can see, the pt.w is undefined, I don't understand why ? Where am I wrong ?

2) The quaternion should provide the angle of the cube but how should I move it in 3D space ? Should I use the Linear Acceleration ? Any sample code ?

3) According to the documentation there is a calibration is it a mandatory ?

Many Thanks !
Jean-Philippe

Comments

This discussion has been closed.