Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Force Feedback bug
07-16-2012, 01:54 AM,
#4
 
It is the algorithmic implementation of a low pass filter(to smooth the value):
Quote:for i from 1 to n
y[i] :=a * x[i] + (1 - a) * y[i-1]
with a = 10/11.

It would be more obvious with:
Code:
    float new_feedback = 0
    for (int i = 0; i < repeats; ++i)
    {
        ...
        new_feedback += 0.5 * (tire[FRONT_LEFT].GetFeedback() + tire[FRONT_RIGHT].GetFeedback());
    }
    new_feedback /= repeats;                            // average of internal solver loop aka new_feedback
    float a = repeats / (repeats + 1)                    // weight
    feedback = a * new_feedback + (1 - a) * feedback;    // low pass
Reply


Messages In This Thread
Force Feedback bug - by LBodnar - 07-15-2012, 04:06 PM
[No subject] - by NaN - 07-15-2012, 04:53 PM
[No subject] - by LBodnar - 07-15-2012, 06:28 PM
[No subject] - by NaN - 07-16-2012, 01:54 AM
[No subject] - by LBodnar - 07-16-2012, 05:15 AM
[No subject] - by NaN - 07-16-2012, 05:24 AM
[No subject] - by LBodnar - 07-16-2012, 05:33 AM
[No subject] - by NaN - 07-16-2012, 05:55 AM
[No subject] - by NaN - 07-16-2012, 06:32 AM
[No subject] - by LBodnar - 07-16-2012, 07:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)