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

Definition of alarm zone #38

Closed 76rhodan closed 5 years ago

76rhodan commented 5 years ago

After setting up this script / bot without almost no hiccups (running on a Pi zero W with an SDR dongle), I‘ve a bit of trouble setting up the alarm zone. It seems, that whatever I enter there is somehow wrongly interpreted.

E.g. if I have an alarm zone with a distance of 2 miles and an elevation of 70°, the bot tweets happily planes, which are miles further away (and never came near 2 miles) or below the elevation. Something else which surprises me is, that there are almost no tweets about low flying planes. I‘m living close by Frankfurt / Main and there are plenty of planes short after T/O or just about to land. Is there any further „filter“ hidden anywhere?

kevinabrandon commented 5 years ago

There are no other filters, but you do need to restart the scripts every-time you update the config ini. The only time you'd see an airplane tweeted that was never within your 2 mile zone is if it happened to have an elevation higher than 70 degrees. The only time you'd see airplanes with lower than 70 degrees is if they were closer than two miles.

Also the tweet is delayed until after the airplane has left the zone by the wait_x_updates variable. Basically no airplanes should be tracked until they are within the zone, then they're tracked until x_updates after they've left the zone, only then are they tweeted.

76rhodan commented 5 years ago

Thanks for the reply!

I guess I had a misunderstanding of how it works and figured it out in the meanwhile. I’ve added a maximum altitude to the alarm zone, everything above is ignored. As I live close by to a pretty busy airport, the bot was almost constantly tweeting, since there is almost always something in the three mile zone which I’ve selected.

BTW: The script runs fine of site as well. Due to the heatwave in parts of europe and the Pi Zero working almost at 100% due to PhantomJS, which lead to an more or less always increasing core temperature, I moved the tracker to my VPS. Works like a charm!

Bering-Sea commented 5 years ago

@thomasschuette I live right next to a runway and was wondering what your settings are? I just got mine running and the planes land in my alarm area. It only tweeted that it left and not landed. The overhead planes tweet fine obviously.

76rhodan commented 5 years ago

I‘m living close by EDDF and had to limit the tweeting frequency a bit, as I am using the free data feed from FlightAware and the 1000 requests were used up in just three or four days past month.

My settings right now from config.ini

distance_alarm = 2
elevation_alarm = 85
wait_x_updates = 7
sleep_time = 0.5

Additionally, I changed the code of tracker.py slightly

# check to see if it's in the alarm zone:
if a.distance < abovetustin_distance_alarm and a.altitude < 15000 or a.el > abovetustin_elevation_alarm:

So, everything within the distance alarm and below 15000 feet or enters the elevation alarm is a candidate for a tweet.

Well, for your problem: Maybe wait_x_updates is set to high. I could imagine, that a plane enters the distance alarm and lands before you got enough updates - maybe your receiver has no more reception when planes are below a certain altitude, saturation of the receiver due to too strong signals, ... For taking off, this wouldn‘t be a problem.

My bot is happily tweeting here: https://mobile.twitter.com/AKoeppern Seems, that my FlightAware requests are used up again :-(