Renaming circlebot -> advisorycircular.
This commit is contained in:
parent
fcbb023a5e
commit
579a180d51
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "circlebot",
|
||||
"name": "advisorycircular",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(ns lemondronor.circlebot
|
||||
(ns lemondronor.advisorycircular
|
||||
(:require
|
||||
["commander" :as commander]
|
||||
["fs" :as fs]
|
||||
@ -166,7 +166,8 @@
|
||||
|
||||
|
||||
(defn ac-desc [ac]
|
||||
(str (:icao ac) " " (:lat ac) " " (:lon ac)
|
||||
(str (:icao ac) " " "http://tar1090.adsbexchange.com/?icao=" (:icao ac)
|
||||
" " (:lat ac) " " (:lon ac)
|
||||
" #" (:registration ac) " " (:alt ac) " " (:curviness ac) " "
|
||||
(:normalized-curviness ac)))
|
||||
|
||||
@ -476,7 +477,12 @@
|
||||
(:distance airport-properties)
|
||||
(:minimum-airport-distance-km config)
|
||||
(:label airport-properties)
|
||||
())
|
||||
()))
|
||||
(let [alts (map :alt recent-positions)
|
||||
min-alt (apply min alts)
|
||||
max-alt (apply max alts)
|
||||
ratio (/ max-alt min-alt)]
|
||||
(log-info "%s: ratio of min alt to max alt: %s [%s - %s]" icao (.toFixed (/ max-alt min-alt) 1) min-alt max-alt))
|
||||
(do
|
||||
(p/let [coarse (pelias/reverse (:pelias config) lat lon {:layers "coarse"})]
|
||||
(let [coarse (first (:features coarse))]
|
||||
@ -512,7 +518,7 @@
|
||||
js/JSON
|
||||
(clj->js (track->geojson older-positions recent-positions icao centroid)))
|
||||
{})))
|
||||
(log-warn "Skipping tweet %s %s" image-path description)))))))))))
|
||||
(log-warn "Skipping tweet %s %s" image-path description))))))))))
|
||||
|
||||
|
||||
(defn process-potential-circles [acs config now]
|
||||
@ -530,7 +536,7 @@
|
||||
;; This is how many degrees of turning we need to see over
|
||||
;; max-history-age-ms ms to consider it a potential circling
|
||||
;; aircraft.
|
||||
:curviness-threshold-degrees 1440
|
||||
:curviness-threshold-degrees (* 2 360)
|
||||
;; If the centroid of the aircraft's positions is less than this
|
||||
;; close to an airport, then it's probably just doing flight
|
||||
;; training.
|
Loading…
Reference in New Issue
Block a user