In the _src/kalmanfilter.cpp file of the project of the fifth course module (inside the part 1 of the course), if px*px + py*py is 0, a division by zero will occur.
Possible solution: Check the ekf.x_ variable in src/FusionEKF.cpp, in the update step, before calling the UpdateEKF() function. If both px and py are 0, we should skip the update step (and not update the previous_timestamp_ variable). This way, we will fix a potential runtime problem and will save some computation time not computing the jacobian if it is not going to be used inside UpdateEKF().
NOTE: I open this issue to be fixed in the future.
In the _src/kalmanfilter.cpp file of the project of the fifth course module (inside the part 1 of the course), if
px*px + py*py
is 0, a division by zero will occur.Possible solution: Check the
ekf.x_
variable in src/FusionEKF.cpp, in the update step, before calling theUpdateEKF()
function. If bothpx
andpy
are 0, we should skip the update step (and not update theprevious_timestamp_
variable). This way, we will fix a potential runtime problem and will save some computation time not computing the jacobian if it is not going to be used insideUpdateEKF()
.NOTE: I open this issue to be fixed in the future.