Crates.io | wte-mt-rx-parser |
lib.rs | wte-mt-rx-parser |
version | 0.3.0 |
source | src |
created_at | 2024-07-03 20:29:17.701097 |
updated_at | 2024-07-05 11:37:26.68691 |
description | MT-RX-3+ (AIS, 406 + 121.5) message parser |
homepage | |
repository | https://github.com/roby2014/wte-mt-rx-parser |
max_upload_size | |
id | 1290975 |
size | 25,059 |
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:
Provides simple parsing utilities for:
MT1UUUNNNTFHHHHHHHHHHHHHHHSS112233N4445566WYYYY
)MT6UUUNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRYYYY
)SS,1,NNN<CR>
/ SS,A,NNN<CR>
)Notes:
[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
}))
If you find any issues or have suggestions for improvement, please feel free to open an issue.