Skip to content

A Rust library for initializing and reading GPS data from a Yahboom GPS module via a serial port.

License

Notifications You must be signed in to change notification settings

YenHarvey/yahboom_gps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yahboom_gps

githubcrates-iodocs-rs


yahboom_gps is a Rust library for initializing and reading GPS data from a Yahboom GPS module via a serial port.

Installation

Add this to your Cargo.toml:

[dependencies]
yahboom_gps = "0.1.0"

Example

Here is a complete example demonstrating how to use the yahboom_gps library to initialize the GPS module, read GPS messages, and parse GPS data.

use yahboom_gps::{gps_init, read_complete_gps_message, parse_gps_data};
use anyhow::Result;

fn main() -> Result<()> {
    // Initialize the GPS module
    let mut port = gps_init("COM3", 9600)?;

    // Continuously read and parse GPS messages
    while let Ok(Some(message)) = read_complete_gps_message(&mut port) {
        // Parse the GPS data
        let parsed_data = parse_gps_data(&message);

        // Print the parsed GPS data
        println!("Parsed GPS Data: {}", serde_json::to_string_pretty(&parsed_data)?);
        println!("--- End of message ---");
    }

    Ok(())
}

Documentation

For more detailed documentation, please visit docs.rs.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

Contact

If you have any questions or suggestions, please feel free to contact me at [401].

About

A Rust library for initializing and reading GPS data from a Yahboom GPS module via a serial port.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages