 
 (defn send-hover []
   (send-at "AT*PCMD" [0 0.0 0.0 0.0 0.0]))
-
-#_(do
-  (trim)
-  (println "prepare....")
-  (Thread/sleep 5000)
-  (println "takeoff")
-  (takeoff)
-  (Thread/sleep 8000)
-  (println "land")
-  (land)
-  (Thread/sleep 8000)
-  (println "emerg")
-  (emergency)
-  (Thread/sleep 1000)
-  (println "bye"))
 
 ;;
 ;; Dump:

      (doto nav-socket
        (.send trigger)
        (.receive packet))
      (parse-navdata (.getData packet)))
    (catch java.net.SocketTimeoutException e
      nil)))

      new-options
      (parse-options ba next-offset new-options))))


(defn parse-navdata [navdata]
  (when @navdata-logging? (log navdata))
  (merge
    {:header   (get-int navdata 0)
     :seq-num  (get-int navdata 8)
     :vision   (= (get-int navdata 12) 1)}
    (parse-nav-state (get-int navdata 4))
    (parse-options navdata 16 {})))

(defonce ^DatagramSocket nav-socket (doto (DatagramSocket. 5554) (.setSoTimeout 1000)))
(def trigger (DatagramPacket. (byte-array (map ubyte [0x01 0x00 0x00 0x00])) 4 drone-ip 5554))
