Share

Kalman Filter

Tracker: Bugs

5 unsigned where signed should be used - ID: 1874285
Last Update: Settings changed ( vincent_zalzal )

kalman/ekfilter_impl.hpp, line 650-651:
K_UINT_32 i, j, k, N = P_.nrow();
for (i = N - 2 + BEG; i >= BEG; --i) {

if BEG is 0 (the arrays/matrices are 0 indexed), then the loop would stop
when i=-1, but i can not be -1, because it is unsigned.


j--n ( j--n ) - 2008-01-18 01:54

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2008-01-28 04:51
Sender: vincent_zalzalProject Admin


Thank you for your bug report and patch. I have modified the library and
made a new release (1.3) with this change.


Date: 2008-01-18 02:13
Sender: j--n


this was my hack:

K_UINT_32 j, k, N = P_.nrow();
K_INT_32 i;
for (i = N - 2 + BEG; i >= (K_INT_32)BEG; --i) {

note that I had to convert BEG to signed to use the signed version of >=

I had to make a similar change to line 675/708:
K_INT_32 j;
for(j = n - 1 + BEG; j >= (K_INT_32)BEG; --j) {



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
close_date - 2008-01-28 04:51 vincent_zalzal
status_id Open 2008-01-28 04:51 vincent_zalzal
resolution_id None 2008-01-28 04:51 vincent_zalzal