#message-parser #receiver #rss #ais #epirb #mt-rx

wte-mt-rx-parser

MT-RX-3+ (AIS, 406 + 121.5) message parser

2 unstable releases

0.3.0 Jul 5, 2024
0.2.4 Jul 3, 2024
0.1.4 Jul 3, 2024

#1955 in Parser implementations

Download history 13/week @ 2024-07-09 17/week @ 2024-07-16 7/week @ 2024-07-23 4/week @ 2024-07-30 9/week @ 2024-08-06 2/week @ 2024-09-10 1/week @ 2024-09-17 28/week @ 2024-09-24 28/week @ 2024-10-01 23/week @ 2024-10-08 5/week @ 2024-10-22

58 downloads per month

MIT license

24KB
327 lines

wte-mt-rx-parser

WTE-MT-RX Parser on crates.io WTE-MT-RX Parser on docs.rs GitHub last commit

This Rust crate aims to provide functionality for parsing messages generated by the WTE MT-RX-3 AIS, 406 + 121.5 alerting receivers. These receivers are designed to decode various types of emergency and maritime communication signals, including:

  • 406MHz EPIRBs, PLBs and ELT beacons operating across the frequencies 406.020 to 406.045 MHz.
  • AIS based SART alerting devices operating on both 161.975MHz and 162.025MHz.
  • 121.5MHz or 243MHz man-overboard devices and emergency homing transmitters with the use of directional antennas.

Features

Provides simple parsing utilities for:

  • 406 Message Serial Output
    • MT protocol structured messages (MT1UUUNNNTFHHHHHHHHHHHHHHHSS112233N4445566WYYYY)
    • MT protocol raw messages (MT6UUUNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRYYYY)
  • Received Signal Strength (RSS) frequency / alerts (SS,1,NNN<CR> / SS,A,NNN<CR>)

Notes:

  • For parsing AIS messages (NMEA format), refer to other crates, such as nmea-parser.
  • Refer to MT-RX-3 user manual for more information (#references).

Usage

[dependencies]
wte-mt-rx-parser = "0.1.4"
fn main() {
    let samples = vec![
        "MT1001000AL400C592753572B323433212S1723756E4706",
        "MT6001001FFFE2FA00E0000CBAB959DB0903788C71B79F84B",
        "SS,A,123",
        "SS,1,123",
    ];

    for s in samples {
        println!("{:?}", wte_mt_rx_parser::parse(s));
    }
}

result:

Ok(MtStructured(MtStructured {
    header: "MT1",
    id: "001",
    sequence_number: 0,
    message_type: Alert,
    format_flag: 'L',
    beacon: "400C592753572B3",
    signal_strength: "23",
    lat_degrees: Some(43),
    lat_minutes: Some(32),
    lat_seconds: Some(12),
    lat_direction: South,
    long_degrees: Some(172),
    long_minutes: Some(37),
    long_seconds: Some(56),
    long_direction: East,
    checksum: 18182
}))

Ok(MtRaw(MtRaw {
    header: "MT6",
    id: "001",
    sequence_number: 1,
    data: "FFFE2FA00E0000CBAB959DB0903788C71B79",
    checksum: 63563
}))

Ok(Rss(Rss {
    rss_type: Alert,
    nnn: 123
}))

Ok(Rss(Rss {
    rss_type: Frequency,
    nnn: 123
}))

Contributing

If you find any issues or have suggestions for improvement, please feel free to open an issue.

References

Dependencies

~280–750KB
~18K SLoC