parent
f1738938b8
commit
6246a9d3ab
@ -187,6 +187,12 @@
|
|||||||
(> (:alt ac) 300)))
|
(> (:alt ac) 300)))
|
||||||
|
|
||||||
|
|
||||||
|
(defn circling2? [ac config]
|
||||||
|
(let [relevant-history (filter #(and (:alt %) (> (:alt %) 300)) (:history ac))]
|
||||||
|
(and (> (geo/flight-curviness relevant-history) (:curviness-threshold-degrees config))
|
||||||
|
(> (:alt ac) 300))))
|
||||||
|
|
||||||
|
|
||||||
;; Returns a vector of two elements,
|
;; Returns a vector of two elements,
|
||||||
;; [updated-database potentially-circling-aircraft]
|
;; [updated-database potentially-circling-aircraft]
|
||||||
|
|
||||||
@ -201,7 +207,7 @@
|
|||||||
ac (assoc ac
|
ac (assoc ac
|
||||||
:curviness curviness
|
:curviness curviness
|
||||||
:normalized-curviness (geo/flight-normalized-curviness (:history ac)))
|
:normalized-curviness (geo/flight-normalized-curviness (:history ac)))
|
||||||
currently-circling? (circling? ac config)
|
currently-circling? (circling2? ac config)
|
||||||
previously-circling? (:started-circling-time ac)]
|
previously-circling? (:started-circling-time ac)]
|
||||||
(cond
|
(cond
|
||||||
(and currently-circling?
|
(and currently-circling?
|
||||||
|
Loading…
Reference in New Issue
Block a user