From be4f25386dc6c3cc72d40ef760bbc07ba26f1bb8 Mon Sep 17 00:00:00 2001 From: 5foot8 Date: Tue, 4 Sep 2018 20:53:19 +0100 Subject: [PATCH] Update cli.py I added the altitude 'filter' in line 70 so that the camera was not constantly following the landing aircraft at the local airport. I wanted to be able to identify the aircraft that were going over the top. I live so close to the final approach at my local airport the camera was fixated on following these landing planes because they were always the closest aircraft, I'm literally less than 2 miles from the approach line. I don't have the coding skills to add this as a option in the command line options - but I'm guessing it would be a simple addition, my attempt ended badly. I chose 30000 feet as my boundary as this is supposedly the area where contrails are most likely to be started to be produced. --- maho/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maho/cli.py b/maho/cli.py index 9da12fd..c7b0316 100644 --- a/maho/cli.py +++ b/maho/cli.py @@ -67,7 +67,7 @@ def track_closest_aircraft(latitude, longitude, elevation, host, port, q): # or target is old, then use this new aircraft # or new aircraft isn't the target, but it is closer, so we switch! if (target is None or target.age > 60 or - (target.icao != aircraft.icao and distance < target_distance)): + (target.icao != aircraft.icao and aircraft.altitude >= (30000 * 0.3048) and distance < target_distance)): target = aircraft # if we aren't the target at this point then bail