adsbxcot icon indicating copy to clipboard operation
adsbxcot copied to clipboard

Filters are not explicit enough

Open ampledata opened this issue 4 years ago • 0 comments

Per classes.py, line 103:

                        if filter_key and filter_key in a_known_craft[self.known_craft_key].strip().upper():

Unfortunately that will match a filter_key of 441F to a a_known_craft[self.known_craft_key].strip().upper() of 441FA.

Instead what we should do is be explicit with something like:

                        if filter_key and filter_key is a_known_craft[self.known_craft_key].strip().upper():

Assuming the filter_key and a_known_craft[self.known_craft_key].strip().upper() are "clean" inputs (that is, no special characters inserted by the dump1090 decoder and a good-faith effort on the end-user on normalizing their filter data (e.g. no spaces/newlines/special characters/ALL CAPITALS/NO TRICK SPELLING).

https://www.youtube.com/watch?v=gSJeHDlhYls

https://www.youtube.com/watch?v=nzUY6Iiur6E

ampledata avatar May 18 '21 16:05 ampledata