dump1090 icon indicating copy to clipboard operation
dump1090 copied to clipboard

Add ICAO registration country flags

Open don-willingham opened this issue 8 years ago • 6 comments

Display the country's flag next to the ICAO registration two character code.

don-willingham avatar Apr 01 '16 01:04 don-willingham

"Files changed 254"... you have never heard about the CSS image sprites or Base64 sprites?

hhrhhr avatar Apr 01 '16 05:04 hhrhhr

I'm a CSS noob, so I honestly haven't heard of those. Thanks for pointing them out. I grabbed the set of flags as individual icons. The author/maintainer of FlagFox said he even tweaks the colors occasionally. It was straightforward to have the http server handle the flag URLs, if it was a single image file, that could be streamlined. If the flags are embedded in the html file, then I can revert the changes to handle the flag URLs. In one case, I would have to compose an image of all the flags, and reference the location of each, which may not be as straight forward as one might think, because some icons are taller or wider than others. Either way, I would want to maintain the flags as individual icons, and automate the composition of the image with all the flags and the offsets, or the Base64 encoding. I think I would lean towards using the Base64 method.

don-willingham avatar Apr 02 '16 12:04 don-willingham

@hhrhhr https://github.com/don-willingham/dump1090/commit/fdd4055d56af45a30c5679addcef161effa4701c implements base64 encoded images. The individual flag icons can now be removed.

don-willingham avatar Apr 04 '16 01:04 don-willingham

If you are interested in my opinion, the "database" with the flags looked best in a separate file, which would be generated during "make all".

but to be honest, I am personally against the transformation of the pure decoder in another all-in-one utility. this is not unix-way ;)

hhrhhr avatar Apr 04 '16 02:04 hhrhhr

It would be a bit cleaner to move the flags to another (generated) file. Instead of generating the flags content, and copy/pasting it in. Before dump1090 gets much bigger, it would be nice to have it broken down into components. I'm not planning on refactoring into these components. I like the unix-way, but there are other valid metaphors, such as a plugin architecture, or maybe moving the core of dump1090 into a library that several applications can use.

don-willingham avatar Apr 08 '16 00:04 don-willingham

There is now a single flags.js that contains all of the flags base64 encoded. Since all of the base64 encoded values started with a common prefix, the script that generates flags.js figures out that prefix, and factors it out.

don-willingham avatar Apr 27 '16 02:04 don-willingham