Results 1 to 2 of 2

Thread: Pitch bar dampening, names/styles/formatting

  1. #1
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    33

    Pitch bar dampening, names/styles/formatting

    I'm trying to add a pitch bar to my videos. For some sports, mountain biking, dirt bike riding mountains, etc. all action cameras flatten out the terrain. You can't tell visually if the hill is as gentle as a bunny slope at a ski resort, or a near vertical cliff. I've found that a bar graph that shows pitch helps a lot.

    I'm using "Bar / Level - 002" with style "Pitch bar"
    This is a vertical bar graph that centers on zero and can go positive or negative.
    I assume the style connects it to a function that calculates the pitch from the position and elevation in the GPS data.
    (you need two positions to calculate the difference in elevation for the distance to give the pitch)
    I assume some other style could show throttle position, etc.

    In general, I'm confused about what style does and how that interacts with the "name" of the display object.

    Simply adding the display object does not fully bring joy. It needs some dampening. The values jump wildly, so the bar graph
    flashes wildly. Its so fast its impossible to read, but the series of metrics could be 10, 15, 8, 25, 13, 0, -14, 3, 15,....
    The obvious solution is to use a weighted average to slow down the variations. (This can also be nice on speedometer calculations).
    I could guess that a style might control how heavily the weighted average crushes variation.

    Or perhaps some "weighting coefficient" is a parameter to the Display Object?

    So I'm specifically interested in how I can apply some dampening to the data for the pitch bar.

    More generally, I don't understand how the objects, the styles and other parameters interact.

    And is there source code to this Display Object that I can look at?

    Thanks

  2. #2
    Advanced Tuner
    Join Date
    Apr 2018
    Posts
    294
    Quote Originally Posted by PatFarrell View Post
    I'm trying to add a pitch bar to my videos. For some sports, mountain biking, dirt bike riding mountains, etc. all action cameras flatten out the terrain. You can't tell visually if the hill is as gentle as a bunny slope at a ski resort, or a near vertical cliff. I've found that a bar graph that shows pitch helps a lot.

    I'm using "Bar / Level - 002" with style "Pitch bar"
    This is a vertical bar graph that centers on zero and can go positive or negative.
    I assume the style connects it to a function that calculates the pitch from the position and elevation in the GPS data.
    (you need two positions to calculate the difference in elevation for the distance to give the pitch)
    I assume some other style could show throttle position, etc.

    In general, I'm confused about what style does and how that interacts with the "name" of the display object.

    Simply adding the display object does not fully bring joy. It needs some dampening. The values jump wildly, so the bar graph
    flashes wildly. Its so fast its impossible to read, but the series of metrics could be 10, 15, 8, 25, 13, 0, -14, 3, 15,....
    The obvious solution is to use a weighted average to slow down the variations. (This can also be nice on speedometer calculations).
    I could guess that a style might control how heavily the weighted average crushes variation.

    Or perhaps some "weighting coefficient" is a parameter to the Display Object?

    So I'm specifically interested in how I can apply some dampening to the data for the pitch bar.

    More generally, I don't understand how the objects, the styles and other parameters interact.

    And is there source code to this Display Object that I can look at?

    Thanks
    From what I've seen, the Style allows you to change the Display Object to a different version of the same type of Display Object. So, you may have selected "Bar / Level - 002" when you first added the object, but maybe you like the colors of the "Bar Graph - Light" better after you've had some time to look. Selecting that style will change the values in the Display Object Properties to the ones saved under that "style" to make it look like the other Display Object version.

    Calculating the pitch is probably coming from the "(Pitch)" field. Selecting the Field determines what column of the input data will be feeding values into the Display Object. RaceRender provides a number of fields that it calculates (differentiated by being surrounded with parentheses) which are not directly available in the input data. Unfortunately, I don't think RaceRender will perform any sort of averaging or smoothing to the data. You might be able to implement something in an Enhanced Object Script Editor with the "Persistent Script Variables" checkbox checked (note: the preview does not work well with persistent script variables. It often forgets the previous values; so you need to click OK, back up the video, and click Play to see how it actually behaves). That's probably a decent amount of work but doable. You could also export the data as a CSV and then perform the smoothing yourself in Excel, but you'd need to do that for every video, and I don't think that export includes the RaceRender-calculated fields anyway.