Expand description

Kubos API for interacting with NovAtel OEM6 High Precision GNSS Receivers

All work is done against an instantiated OEM6 struct.

More information about the device and it’s behavior can be found in the following guides:

Examples

use novatel_oem6_api::*;
use std::thread;
use std::sync::mpsc::sync_channel;

// Create communication channels to be used between the read thread and the main thread
let (log_send, log_recv) = sync_channel(5);
let (response_send, response_recv) = sync_channel(5);
let (response_abbrv_send, response_abbrv_recv) = sync_channel(5);

// Create the main connection to the device
let oem = OEM6::new("/dev/ttyS5", BaudRate::Baud9600, log_recv, response_recv, response_abbrv_recv).unwrap();

// Clone the connection mutex for the read thread
let rx_conn = oem.conn.clone();

// Start up a read thread to consume messages from the device
thread::spawn(move || read_thread(&rx_conn, &log_send, &response_send, &response_abbrv_send));

// Request that the device send position information once per second
oem.request_position(1.0, 0.0, false)?;

// Continually read the log messages
loop {
    let entry = oem.get_log()?;

    match entry {
        Log::BestXYZ(log) => {
            println!("Best XYZ Data:");
            println!("    Position: {:?}", log.position);
            println!("    Velocity: {:?}", log.velocity);
        }
        _ => {},
    }
}

Modules

Mock objects for use with unit tests

Structs

Log message containing position information

Version information about a specific system component

Wrapper for UART stream

Structure for OEM6 device instance

Receiver status flags

Event/error log message

Log message containing version information

Enums

Serial port baud rates.

Supported log messages

Supported message types

Common Error for OEM Actions

Response values returned after sending a command to the device.

Custom errors for UART actions

Functions

Continually read messages from the OEM6 device

Type Definitions

Custom error type for OEM6 operations.