#aka #parser #aprs #fabulous #libfap #warpper

fap

Rust warpper around Fabulous APRS Parser (aka libfap)

2 unstable releases

Uses old Rust 2015

0.2.1 Jun 28, 2018
0.1.0 Jun 10, 2018

#8 in #aprs

26 downloads per month

Artistic-1.0-Perl

800KB
20K SLoC

Shell 7.5K SLoC // 0.2% comments M4 7K SLoC // 0.2% comments C 5K SLoC // 0.1% comments Rust 217 SLoC // 0.0% comments Automake 11 SLoC // 0.4% comments

Fabulous APRS Parser

On Travis CI On crates.io On docs.rs

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–2MB
~39K SLoC