             (zero? (:lon r)))))
 
 
-(defn log-record-to-db-record [r]
+(defn log-record-to-db-record [r provenance]
   (let [db-rec
         {:timestamp (sql-str (timefmt/unparse db-timestamp-formatter (:timestamp r)))
          :icao (sql-str (:icao r))

         :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
