kevinabrandon / AboveTustin

ADS-B Twitter Bot. Uses dump1090-mutability to track airplanes and then tweets whenever an airplane flies overhead.
MIT License
72 stars 21 forks source link

Option to only show map in screenshot #5

Closed Romeo-Golf closed 7 years ago

Romeo-Golf commented 7 years ago

As the majority of the information about the flight is in the tweet, would it be possible to have an option to only include the map in the screenshot?

kevinabrandon commented 7 years ago

Maybe, I could set a crop dimensions in the configuration file.

Right now the size of the screenshot is set in the configuration file, so we could an optional crop dimensions that would define what part of the screenshot is cropped before sending the tweet.

It would then be up to the user to figure out the exact crop dimensions to get rid of the table.

Jestre commented 7 years ago

I added this to my fork, but since it doesn't appear Selenium supports cropping functionality, I had to fall back to Pillow, which to install via pip would require all of the build tools, so I replaced the venv with one that allowed system packages, and simply installed that via apt.

I wonder, however, if there is a list of all possible variables available from the dump1090 json, for I wanted to also include the aircraft type but didn't see that in the current tweet options. To get around that, I copy the data section which normally appears above the flights table, and overlayed it on the bottom corner of the now cropped image. I could do away with that if I could include the aircraft type in the tweet text.

Thanks for this awesome app!

kevinabrandon commented 7 years ago

@Jestre that's cool, if you want to submit a pull request for just initial crop I'll accept it.

As far as aircraft type, I see in the data/aircraft.json file they have a "category" with things like "A0" or "A3". I don't understand them, I assume they choose what icon is used on the map.

Also, what's your bot's twitter handle? I'd like to follow it :)

Jestre commented 7 years ago

I'll get that pull to you and see what you think.

I looked through the dump1090 source, and it looks like those flight details are part of the ICAO code, at least that's what he uses to display it in the info box. Not sure if that is encoded along with the ADSB data, or whether he is looking it up somehow. Since it is not always present, I am going to see if I can chop that out and display it, and since it isn't written to the DB either, I may try to add that to the adsbreceiver code.

The bot's Twitter handle is AboveRaleigh, though technically it is above my house which is about 20 miles SE of Raleigh :)

Romeo-Golf commented 7 years ago

As far as aircraft type, I see in the data/aircraft.json file they have a "category" with things like "A0" or "A3". I don't understand them, I assume they choose what icon is used on the map.

The A0, A3 numbers are the ADS-B Emitter Category which are commonly used to determine which icon to use and what size to display it at:

http://www.virtualradarserver.co.uk/SourceHelp/html/0d447530-d1c5-ae07-199c-299c31678c23.htm

https://books.google.co.uk/books?id=XJ5pAwAAQBAJ&pg=PA48&lpg=PA48&dq=icao+categories+a0+a1+a2+a3

Romeo-Golf commented 7 years ago

Also, what's your bot's twitter handle? I'd like to follow it :)

So I was thinking that it might be useful to have a generic hashtag included in all of the various twitter bots feeds to help locate other bots and potentially track the number which are actively posting on any given day..

Which lead me to think while the current project name very aptly describes the output from your instance, it may be beneficial for the project to have a more generic name which the users can then append their location, eg

If the project name was SkiesAbove then the user instances could be named SkiesAboveTustin, SkiesAboveRaleigh etc... or perhaps even Skies-Above-$Location if twitter allows -'s in the username?

Jestre commented 7 years ago

I originally left the AboveTustin hashtag, as that was the project name and I wanted to ensure that Kevin got credit for the code, but then I found a couple others which had changed it to reflect their city, so I changed mine. Either way, it shouldn't be too long, otherwise it might eliminate other useful information. Perhaps a shorter #AT or something similar could be included?

I guess I can change the URL of that feed to point to the original repo.

Romeo-Golf commented 7 years ago

Yeah it seems logical that folks would use something other than AboveTusin for their instances and sincenot everyone is using the AboveSomewhere format, my thinking was that if the project name didnt contain a location then as you say provided it was suitably short it could potentially be included as a hashtag in every tweet regardless of what account the users has configured their instance to post to..

In terms of identifying the other instances there are plenty of non-bot accounts using each of the tags individually, but very rarely is there two in combination with the best pairing I found being:

https://twitter.com/search?q=%23movingquickly%20%23UpInTheClouds