Results 1 to 3 of 3

Thread: Lean angle - left /right, using GoPro Data stream

  1. #1
    Potential Tuner
    Join Date
    Oct 2019
    Posts
    3

    Lean angle - left /right, using GoPro Data stream

    Hi guys,

    Has anyone been able to creat a "absolute" lean angle object using data from GoPro Data stream - Accelerometer / Gyroscope ?
    The data streams I see are
    Gyroscope (z) [rad/s] Gyroscope (x) [rad/s] Gyroscope (y) [rad/s]
    Accelerometer (up/down) [m/s2] Accelerometer (right/left) [m/s2] Accelerometer (forward/back) [m/s2]

    I know there is another application that managed to compute this somehow; tried and went down mathematics/physics rabbit hole last night trying to get a grasp of things; it's been a while since I played around with them) , but alas; maybe somebody here managed already to compute this stream?

    P.S. My immediate application would be motorcycle lean angle, relative to the asphalt.

    Thanks, and cheers.

  2. #2
    I don't think this is built in, but I would think that Gyroscope (z) [rad/s] would be the field that you would want. This would probably only work if the camera is physically attached to the bike itself though. If you have the camera mounted on your helmet, I would think that you would be keeping your head mostly level through the turns, and the GoPro data wouldn't tell you much of anything about lean angle.

    A gauge like this should work:Lean Angle - Gauge.rro

    You should be able to copy that gauge (or create your own) into the Styles folder, and then when you next open RaceRender, it should appear in the list of Gauges.

    If you set the field to Gyroscope z, then you should be getting values between -1.57 (bike on the ground on the left) and 1.57 (bike on the ground on the right). Realistically, you're probably only going to get numbers between -1 and 1 since 1 radian is 57.2958 degrees.

    If you prefer looking at degrees, you could create a custom field at the bottom of the Input File Config where you take the Gyroscope z field and multiply it by 57.2958. Then you could use the custom field in the gauge for something that might be more comprehensible. You would likely need to change the Range from -1.57/1.57 to -90/90 at that point though.

  3. #3
    Potential Tuner
    Join Date
    Oct 2019
    Posts
    3
    Thanks for your informative reply.
    I have indeed mounted the gopro camera in the nose of my track bike as leveled as I could to the relative upright position on the stands.

    I will try to use the Z axis. And apply the formula you suggested.
    As I said, there is there are some other applications that calculate this according to.. from what I gather... relative position on previous and next reading. (like a lead and lag reference)
    I will try to compare results and see if they match.

    Love RR as race editor (also love your work on the kart F1 like leaderboard and sectors, still fidgeting around with my HUD, nothing definitive, but for race sessions would definitely try and include your leaderboard), if I have to use 3rd party to get an accurate lean angle well no worries.
    I won't name them, as I don't think it's appropriate.

    P.S. Thanks for sharing the gauge, I'm mobile now, but will definitely try it tonight.