Skip to main content

ardupilot_binlog/
lib.rs

1//! Parser for ArduPilot DataFlash BIN log files.
2//!
3//! ```
4//! use ardupilot_binlog::Reader;
5//! use std::io::Cursor;
6//!
7//! let data: Vec<u8> = vec![];
8//! let mut reader = Reader::new(Cursor::new(data));
9//! for result in &mut reader {
10//!     let entry = result.unwrap();
11//!     if let Some(roll) = entry.get_f64("Roll") {
12//!         println!("roll = {roll}");
13//!     }
14//! }
15//! // Access discovered formats after iteration
16//! println!("{} formats discovered", reader.formats().len());
17//! ```
18
19mod entry;
20mod error;
21mod file;
22mod format;
23mod reader;
24mod value;
25
26pub(crate) const HEADER_MAGIC: [u8; 2] = [0xA3, 0x95];
27pub(crate) const FMT_TYPE: u8 = 0x80;
28
29pub use entry::Entry;
30pub use error::BinlogError;
31pub use file::File;
32pub use format::MessageFormat;
33pub use reader::Reader;
34pub use value::FieldValue;