udacity / sdc-issue-reports

29 stars 6 forks source link

Lesson 23: EKF - Step 13: answer not accepted when using pow from <cmath> #1413

Closed LinasKo closed 5 years ago

LinasKo commented 5 years ago

// Accepted answer uses: float dt_2 = dt dt; float dt_3 = dt_2 dt; float dt_4 = dt_3 * dt;

// The following is not accepted

include

... float dt_2 = pow(2.0, dt); float dt_3 = pow(3.0, dt); float dt_4 = pow(4.0, dt);

mvirgo commented 5 years ago

Hi Linas -

You need to use the appropriate ordering for pow() - dt comes first, then the exponent, i.e. float dt_2 = pow(dt, 2.0);

LinasKo commented 5 years ago

Ah, my apologies. Good point.