From 8869c130c16744e7039b8a8be71f22b56346f3dd Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Tue, 7 Jul 2020 12:52:20 -0700 Subject: [PATCH] Save me from replies regarding negative altitudes. --- src/main/lemondronor/advisorycircular.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/lemondronor/advisorycircular.cljs b/src/main/lemondronor/advisorycircular.cljs index e28b5dd..5169f65 100644 --- a/src/main/lemondronor/advisorycircular.cljs +++ b/src/main/lemondronor/advisorycircular.cljs @@ -149,7 +149,7 @@ (let [icao (:icao ac) new-history-entry {:lat (:lat ac) :lon (:lon ac) - :alt (:geom-alt ac) + :alt (max (:geom-alt ac) (:alt ac)) :gnd? (:gnd? ac) :time (:postime ac)}] (if (contains? db icao) @@ -240,7 +240,7 @@ (defn ac-desc [ac] (str (:icao ac) " " "http://tar1090.adsbexchange.com/?icao=" (:icao ac) " " (:lat ac) " " (:lon ac) - " " (:registration ac) " " (:geom-alt ac) " " (:curviness ac) " " + " " (:registration ac) " " (:alt ac) " " (:curviness ac) " " (:normalized-curviness ac))) @@ -571,7 +571,7 @@ :geometry {:type "LineString" :coordinates (map (fn [pos] - [(:lon pos) (:lat pos) (util/feet-to-meters (:geom-alt pos))]) + [(:lon pos) (:lat pos) (util/feet-to-meters (:alt pos))]) coords)}})