Correcting G-forces for Device Yaw Angle
I don't record video with my phone, so usually I have the phone angled towards me when it's mounted in the car (vs mounted "straight forward) like the documentation recommends. This causes the g-force readings to be off a bit-- for example in hard straight line braking, there will be both linear and lateral (x and y) g-forces recorded and in the g-force plot in RaceRender or similar, it will not be in a "straight up" vector.
Minor annoyance/gripe, but I was bored one day so decided to do some of the legwork in hopes to maybe get it integrated into TrackAddict or RaceRender I am not sure what would be a better solution, an option in TA to "set" what angle the device is mounted offset to straight forward and all recorded values are pre-corrected, or something in RaceRender that you can correct all X and Y accel values with.
I did all testing with my phone in normal landscape mode, using TA where Accel X appears to be forward/back accel and Acces Y is left/right. The correction equation should be:
New Accel X = Accel X * cos(b) + Accel Y * sin(b)
New Accel Y = Accel Y * cos(b) - Accel X * sin(b)
where b is the angle of the phone in degrees in relation to straightforward. Positive values would be angled to the left (towards the driver in left hand drive).
Would be handy for me (maybe others)? to do this on the fly vs manually having to open up huge excel files and do the conversion, prior to importing into RaceRender.
Here's a little before/after video I did in my Tacoma (just braking in straight line to demo):
Before: https://www.youtube.com/watch?v=DeDu_JXU4_U
After: https://www.youtube.com/watch?v=A6eUgCzwYk4