1 unstable release
0.1.4 | Sep 29, 2020 |
---|---|
0.1.3 |
|
0.1.2 |
|
0.1.1 |
|
0.1.0 |
|
#68 in #gps
6KB
83 lines
A rust library for reading data from a gps sensor using rpi_embedded.
This library has documentation here: https://docs.rs/gps_data_reader_bjarki18/
rpi_embedded library documentation: https://docs.rs/rpi_embedded/
lib.rs
:
Interface to the data read from a gps module.
NOTE, the only data accepted in this crate is from the "$GPGGA" data stream. BE SURE the data you want is included in that data stream.
Output
The data is output and printed in the terminal screen by using a vector to split the
data stream at every ,
instance. Every gps data is stored in a String format so it can
be easily accessed if you so choose.
Examples
Basic example:
use gps_data_reader_bjarki18::GPS;
use rpi_embedded::uart::{Uart, Parity};
fn main(){
let mut gps = GPS::default();
gps.set_baud(9600);
let mut uart = Uart::new(gps.baud, Parity::None, 8, 1).unwrap();
let data_stream = uart.read_line().unwrap();
gps.read_data(data_stream);
}
Dependencies
~375KB