https://github.com/ardupilot/clj-ardupilot-utils
https://github.com/ardupilot/clj-ardupilot-utils
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ardupilot/clj-ardupilot-utils
- Owner: ArduPilot
- License: epl-1.0
- Created: 2017-06-27T00:59:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-10T18:14:40.000Z (about 2 years ago)
- Last Synced: 2025-05-08T23:03:14.062Z (over 1 year ago)
- Language: Clojure
- Size: 56.8 MB
- Stars: 2
- Watchers: 6
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-ardupilot-utils
[](https://semaphoreci.com/ardupilot/clj-ardupilot-utils)
A Clojure library of helper utilities for use with [Ardupilot](https://github.com/ArduPilot/ardupilot/).
## Installation
`clj-ardupilot-utils` is available from [Clojars](https://clojars.org/ardupilot/clj-ardupilot-utils):
```
[ardupilot/clj-ardupilot-utils "0.1.0"]
```
## Usage
### Parsing a DataFlash log
To parse an ArduPilot dataflash log, use `log-analyzer/parse-bin` which returns a lazy sequence of messages
```clojure
=> (require ['ardupilot-utils.log-reader :as 'log-reader]
['clojure.java.io :as ;io])
=> (log-reader/parse-bin (io/input-stream (io/file "my-log.BIN")))
```
### Analyze a DataFlash log
`clj-ardupilot-utils` provides a log analyzer based losely off the log analysis [tool](https://github.com/ArduPilot/ardupilot/tree/master/Tools/LogAnalyzer) within ArduPilot.
```clojure
=> (require ['ardupilot-utils.log-analysis :as 'log-analysis]
['clojure.java.io :as ;io])
=> (log-analysis/analyze-log (io/input-stream (io/file "my-log.BIN")))
()
```
`analyze-log` takes an input stream, which it will run all tests, or a provided subset of tests over. Any test that fails will be returned, otherwise an empty list is returned.
## License
Copyright © 2017 Michael du Breuil
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.