IGC Parser
A high-level parsing crate for IGC flight recorder files. With most focus on:
- Easy to use
- No run-time asserts meaning that any errors will be through the
Result
type - A panic free crate
You should use this crate if you want to easily, quickly and safely parse igc files.
For additional information on the records use https://xp-soaring.github.io/igc_file_format/igc_format_2008.html
Example: Series of records
Parsing all fixes (B records)
let file = read_to_string.unwrap..unwrap;
let valid_fixes = file.lines.filter_map.;
println!
Example: Single record
Parsing a single record (L record aka comment)
let comment = match parse.unwrap ;
println!;
Example: Entire file
Parsing entire file and getting all valid fixes
let file = read_to_string.unwrap..unwrap;
let igc_file = parse.unwrap;
let valid_fixes = igc_file.get_fixes.clone.into_iter
.filter_map.;
println!
Example: Specific kind of records
Use builder pattern to parse only specific kinds of records
use *;
use fs;
let file = read_to_string.unwrap..unwrap;
let builder = new.parse_fixes.parse_comments.parse_task_info;
let parsed = builder.on_file.unwrap;
let fixes = parsed.get_fixes;
New in 0.1.5
- Serde feature (use feature flag
serde
) - Errors now implement
std::error::Error
throughthiserror