Crate robust_ntrip_client

Crate robust_ntrip_client 

Source
Expand description

§robust-ntrip-client - Robust NTRIP Client

This crate provides a client to connect to a Network Transport of RTCM via Internet Protocol (NTRIP) server. RTCM stands for Radio Technical Commission for Maritime services and is the message type carrying GNSS correction signals to enable centimeter-resolution GNSS position finding.

The implementation in this crate attempts to be robust against network interruptions and other transient errors. The RobustNtripClient handles the low-level interaction with the NTRIP server and would allow plugging an RTCM parsing library. The ParsingNtripClient wraps this low-level client and parses and validates the RTCM messages.

See also the ntrip-client crate. I was unaware of this other crate at the time I began writing robust-ntrip-client.

§Example usage

#[tokio::main]
async fn main() -> eyre::Result<()> {
   let raw_client = robust_ntrip_client::RobustNtripClient::new(
       "ntrip://username:password@example-ntrip-server.com/mountpoint",
       Default::default()
   ).await?;
   let mut ntrip = robust_ntrip_client::ParsingNtripClient::new(raw_client);

   loop {
       let msg = ntrip.next().await?;
       println!(
           "message {}: {} bytes",
           msg.message_number(),
           msg.frame_data().len()
       );
   }
}

Structs§

FrameData
One valid frame of RTCM data from the NTRIP server.
ParsingNtripClient
A client which parses RTCM messages from the NTRIP stream.
RobustNtripClient
A client which automatically reconnects to an NTRIP server in case of interruption.
RobustNtripClientOptions
Options for connecting to the NTRIP server.