2 unstable releases
Uses old Rust 2015
0.2.1 | Jun 28, 2018 |
---|---|
0.1.0 | Jun 10, 2018 |
#8 in #aprs
800KB
20K
SLoC
Contains (autotools obfuscated code, 430KB) src/libfap-1.5/configure, (obscure autoconf code, 1KB) src/libfap-1.5/configure.ac
Fabulous APRS Parser
Rust wrapper around Fabulous (or Finnish?) APRS Parser, aka libfap
.
See crate documentation for usage and examples.
lib.rs
:
Fabulous APRS Parser
This is a Rust wrapper around Fabulous (or, perhaps, Finnish... or both) APRS Parser, aka
libfap
.
To parse a packet:
extern crate aprs;
extern crate fap;
use aprs::{Packet, Position, Degrees, Knots};
let raw = "DISCOF>APT314,RAZOR*,WIDE1*,qAS,GERLCH:/022526h4046.40N/11912.12W-347/001/";
let parsed = fap::Packet::new(raw);
match parsed {
Ok(packet) => {
assert_eq!(packet.source(), "DISCOF");
assert_eq!(packet.latitude(), Some(40.7733335));
assert_eq!(packet.longitude(), Some(-119.202));
assert_eq!(packet.course(), Some(Degrees(347.0)));
},
Err(_) => {
panic!("Bad packet!")
}
}
Parsed packet implements aprs::Packet
trait, see aprs
crate documentation
for details on how to use the returned value.
Dependencies
~0.1–2.1MB
~40K SLoC