Originally Posted by
J_D_W
Hello,
I have used the following formula to calculate pitch and roll based on raw accelerometer readings in microcontroller code:
accelerationX = (signed int)(((signed int)rawData_X) * 3.9);
accelerationY = (signed int)(((signed int)rawData_Y) * 3.9);
accelerationZ = (signed int)(((signed int)rawData_Z) * 3.9);
pitch = 180 * atan (accelerationX/sqrt(accelerationY*accelerationY + accelerationZ*accelerationZ))/M_PI;
roll = 180 * atan (accelerationY/sqrt(accelerationX*accelerationX + accelerationZ*accelerationZ))/M_PI;
As you can see roll (lean angle) is based on readings from all 3 acceleration readings.
I found this post while trying to determine how I can get lean angle readings from GoPro data stream like the poster. I too have the other application I think he means that does the calculation to determine lean and I assume it uses a formula like I post above.
Is there any way in RaceRender to do complex formula such as that for a custom field? I only see simple calculations in the UI. I suppose the other option is to edit the CSV that it creates from the GoPro data and add the calculation there?
Thanks, Jeff