snstac / adsbxcot

Display Aircraft in TAK
https://adsbxcot.rtfd.io
Apache License 2.0
51 stars 14 forks source link

Filters are not explicit enough #8

Open ampledata opened 3 years ago

ampledata commented 3 years ago

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