                      (update-in num-skipped [:rate-too-high] inc))
               :else
               (do
-                (insert! t-con :reports (log-record-to-db-record r))
+                (insert! t-con :reports (log-record-to-db-record r :basestation))
                 (recur rstrecords
                        (assoc previous-ping-time icao ping-ts)
                        (inc num-inserted)

         :altitude (:altitude r)
         :speed (:speed r)
         :heading (:heading r)
         :squawk (sql-str (:squawk r))}]
    (if (has-position? r)
      (assoc db-rec
             :lat (:lat r)


(gflags/define-integer "time-window-secs"
  1
  (str "Only 1 ping will be recorded for each aircraft during each interval of"
       " the specified length."))

(gflags/define-boolean "with-position-only"
  false
