I’m newbie in three js and I’m working on website using three js as 3d model. This 3d model has input from database. The data obtained from 9 degree of freedom sensor (x, y, z) in mysql. Then those data converted to pitch yaw roll using quaternion. The object have to rotate based on pitch yaw roll. My question is can three js make rotation based on roll pitch value from quaternion? I’m using blender json as 3d object.
Those are sensor data from accelerometer, gyroscope and magnetometer. ax, ay, az are from acclerometer. gx, gy, gz are from gyroscope. mx, my, mz are from magnetometer. Those data (from mysql) have to calculate with quaternion to get roll pitch yaw values and rotate the object with quaternion
sorry for late reply
accelerometer m/s2
gyroscope rad/s
i found algorithm that calculate sensor data in quaternion representation from this github https://github.com/ZiCog/madgwick.js but i have no clue to rotate an object automatically based on quaternion from that sensor calculation. Because in that github using serial port to transfer data, in my case i don’t have to use serial port just mysql data