BToschi Hello, BToschi,
I have some trouble with receiving IMU data while using OS2-128.
In Ouster Studio, I can see arbitrary large integers through sensor stream in Outer Studio but I cannot figure out what the integers exactly mean.
According to the User Guide, it decribes only that the sensor sends out acceleration in g and angular velocity in deg/sec by '32bit float format'. I think some processing is needed to get real data.
Is there any scale factor that the large integer output should be devided by it?
Otherwise, How can I get real acceleration and angular velocity with the large value.
Here is my c-code as below.
pu8Buff[]: unsiged char IMU Data Packet.
iPosOfBuff : index of pu8Buff[]
AccelX = (float32_t)(pu8Buff[iPosOfBuff + 27] << 24 | pu8Buff[iPosOfBuff + 26] << 16 | pu8Buff[iPosOfBuff + 25] << 8 | pu8Buff[iPosOfBuff + 24] / 16384);// g
AccelY = (float32_t)(pu8Buff[iPosOfBuff + 31] << 24 | pu8Buff[iPosOfBuff + 30] << 16 | pu8Buff[iPosOfBuff + 29] << 8 | pu8Buff[iPosOfBuff + 28]);// g
AccelZ = (float32_t)(pu8Buff[iPosOfBuff + 35] << 24 | pu8Buff[iPosOfBuff + 34] << 16 | pu8Buff[iPosOfBuff + 33] << 8 | pu8Buff[iPosOfBuff + 32]);// g
AngularVelX = (float32_t)(pu8Buff[iPosOfBuff + 39] << 24 | pu8Buff[iPosOfBuff + 38] << 16 | pu8Buff[iPosOfBuff + 37] << 8 | pu8Buff[iPosOfBuff + 36]);// deg/sec
AngularVelY = (float32_t)(pu8Buff[iPosOfBuff + 43] << 24 | pu8Buff[iPosOfBuff + 42] << 16 | pu8Buff[iPosOfBuff + 41] << 8 | pu8Buff[iPosOfBuff + 40]);// deg/sec
AngularVelZ = (float32_t)(pu8Buff[iPosOfBuff + 47] << 24 | pu8Buff[iPosOfBuff + 46] << 16 | pu8Buff[iPosOfBuff + 45] << 8 | pu8Buff[iPosOfBuff + 44]);// deg/sec
I hope I could get some advice.
Thanks.