Closed Nikitarc closed 2 months ago
profile.h calculate_steering_adjustment()
I don't understand the line 151:
float adjustment = (pTerm + dTerm) * LOOP_INTERVAL;
I would have understood dTerm * LOOP_FREQUENCY or dTerm / LOOP_INTERVAL as dTerm is dx/dt.
dTerm * LOOP_FREQUENCY
dTerm / LOOP_INTERVAL
But why pTerm * LOOP_INTERVAL ?
pTerm * LOOP_INTERVAL
This is actually in sensors.h and is indeed an error.
Thank you for noticing.
I have push a change that should fix it.
profile.h calculate_steering_adjustment()
I don't understand the line 151:
float adjustment = (pTerm + dTerm) * LOOP_INTERVAL;
I would have understood
dTerm * LOOP_FREQUENCY
ordTerm / LOOP_INTERVAL
as dTerm is dx/dt.But why
pTerm * LOOP_INTERVAL
?