TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (387 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (140168 times)
  2. FAT32 Library (72621 times)
  3. Network Ethernet Library (57641 times)
  4. USB Device Library (47954 times)
  5. Network WiFi Library (43553 times)
  6. FT800 Library (42942 times)
  7. GSM click (30140 times)
  8. mikroSDK (28669 times)
  9. PID Library (27056 times)
  10. microSD click (26552 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

LBAND RTK Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: GPS/GNSS

Downloaded: 147 times

Not followed.

License: MIT license  

LBAND RTK Click is a compact add-on board that provides global and easy access to satellite L-Band GNSS corrections. This board features the NEO-D9S-00B, an professional-grade satellite data receiver for L-band correction broadcast from u-blox. Operating in a frequency range from 1525MHz to 1559MHz, the NEO-D9S-00B decodes the satellite transmission and outputs a correction stream, enabling a high-precision GNSS receiver to reach accuracies down to centimeter level. It can also select the GNSS correction data delivery channel alongside advanced security features such as signature and anti-jamming.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LBAND RTK Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LBAND RTK Click" changes.

Do you want to report abuse regarding "LBAND RTK Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


LBAND RTK Click

LBAND RTK Click is a compact add-on board that provides global and easy access to satellite L-Band GNSS corrections. This board features the NEO-D9S-00B, an professional-grade satellite data receiver for L-band correction broadcast from u-blox. Operating in a frequency range from 1525MHz to 1559MHz, the NEO-D9S-00B decodes the satellite transmission and outputs a correction stream, enabling a high-precision GNSS receiver to reach accuracies down to centimeter level. It can also select the GNSS correction data delivery channel alongside advanced security features such as signature and anti-jamming.

lbandrtk_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jan 2023.
  • Type : UART/I2C/SPI type

Software Support

We provide a library for the LBAND RTK Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for LBAND RTK Click driver.

Standard key functions :

  • lbandrtk_cfg_setup Config Object Initialization function.

    void lbandrtk_cfg_setup ( lbandrtk_cfg_t *cfg );
  • lbandrtk_init Initialization function.

    err_t lbandrtk_init ( lbandrtk_t *ctx, lbandrtk_cfg_t *cfg );

Example key functions :

  • lbandrtk_set_default_pmp_cfg This function sets the Point to multipoint (PMP) to default configuration to RAM layer.

    err_t lbandrtk_set_default_pmp_cfg ( lbandrtk_t *ctx );;
  • lbandrtk_get_pmp_cfg This function reads the Point to multipoint (PMP) configuration from RAM layer.

    err_t lbandrtk_get_pmp_cfg ( lbandrtk_t *ctx, lbandrtk_pmp_cfg_t *pmp_cfg );
  • lbandrtk_read_ubx_frame This function waits for an UBX frame message to arrive and reads it.

    err_t lbandrtk_read_ubx_frame ( lbandrtk_t *ctx, lbandrtk_ubx_frame_t *frame );

Example Description

This example demonstrates the use of LBAND RTK Click by setting the Point to multipoint (PMP) configuration and waiting for the UBX-RXM-PMP message, then parsing it and displaying on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, reads the module version, sets the Point to multipoint (PMP) configuration (for EU center frequency by default) and then reads that config and displays on the USB UART.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    lbandrtk_cfg_t lbandrtk_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    lbandrtk_cfg_setup( &lbandrtk_cfg );
    LBANDRTK_MAP_MIKROBUS( lbandrtk_cfg, MIKROBUS_1 );
    if ( LBANDRTK_OK != lbandrtk_init( &lbandrtk, &lbandrtk_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    Delay_ms ( 100 );

    // Read module version
    lbandrtk.frame.class_id = LBANDRTK_CLASS_ID_UBX_MON;
    lbandrtk.frame.msg_id = LBANDRTK_MSG_ID_UBX_MON_VER;
    lbandrtk.frame.payload_len = 0;
    // send poll request
    lbandrtk_write_ubx_frame ( &lbandrtk, &lbandrtk.frame );
    // read polled message
    if ( LBANDRTK_OK == lbandrtk_read_ubx_frame ( &lbandrtk, &lbandrtk.frame ) )
    {
        log_printf( &logger, " ------ MODULE VERSION ------\r\n" );
        log_printf( &logger, " SW version:\r\n %s\r\n\n", &lbandrtk.frame.payload[ 0 ] );
        log_printf( &logger, " HW version:\r\n %s\r\n\n", &lbandrtk.frame.payload[ 30 ] );
        log_printf( &logger, " Extension:\r\n" );
        for ( uint16_t cnt = 0; cnt < ( ( lbandrtk.frame.payload_len - 40 ) / 30 ); cnt++ )
        {
            log_printf( &logger, " %s\r\n", &lbandrtk.frame.payload[ 40 + cnt * 30 ] );
        }
        log_printf( &logger, " ----------------------------\r\n\n" );
    }
    Delay_ms ( 100 );

    if ( LBANDRTK_ERROR == lbandrtk_set_default_pmp_cfg ( &lbandrtk ) )
    {
        log_error( &logger, " Set default PMP configuration." );
        for ( ; ; );
    }

    lbandrtk_pmp_cfg_t pmp_cfg;
    if ( LBANDRTK_OK == lbandrtk_get_pmp_cfg ( &lbandrtk, &pmp_cfg ) )
    {
        log_printf( &logger, " ----- PMP CONFIGURATION ----\r\n" );
        log_printf( &logger, " Center frequency: %lu\r\n", pmp_cfg.center_freq );
        log_printf( &logger, " Search window: %u\r\n", pmp_cfg.search_window );
        log_printf( &logger, " Use service ID: %u\r\n", ( uint16_t ) pmp_cfg.use_service_id );
        log_printf( &logger, " Service ID: %u\r\n", pmp_cfg.service_id );
        log_printf( &logger, " Data rate: %u\r\n", pmp_cfg.data_rate );
        log_printf( &logger, " Use descrambler: %u\r\n", ( uint16_t ) pmp_cfg.use_descrambler );
        log_printf( &logger, " Descrambler init: %u\r\n", pmp_cfg.descrambler_init );
        log_printf( &logger, " Use prescrambling: %lu\r\n", ( uint16_t ) pmp_cfg.use_prescrambling );
        log_printf( &logger, " Unique word: 0x%.8LX%.8LX\r\n", pmp_cfg.unique_word_high, pmp_cfg.unique_word_low );
        log_printf( &logger, " ----------------------------\r\n\n" );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Waits for an incoming UBX messages, reads and displays them on the USB UART. If the received message is PMP data it will be parsed additionally.

void application_task ( void )
{
    if ( LBANDRTK_OK == lbandrtk_read_ubx_frame ( &lbandrtk, &lbandrtk.frame ) )
    {
        if ( ( LBANDRTK_CLASS_ID_UBX_RXM == lbandrtk.frame.class_id ) && ( LBANDRTK_MSG_ID_UBX_RXM_PMP == lbandrtk.frame.msg_id ) )
        {
            log_printf( &logger, " -------- UBX-RXM-PMP -------\r\n" );
            uint16_t num_bytes_user_data = LBANDRTK_UBX_RXM_PMP_MAX_USER_DATA; // Number of bytes for user data for message version 0
            log_printf( &logger, " Version: %u\r\n", ( uint16_t ) lbandrtk.frame.payload[ 0 ] );
            log_printf( &logger, " Time tag [ms]: %lu\r\n", 
                        ( ( uint32_t ) lbandrtk.frame.payload[ 7 ] << 24 ) | ( ( uint32_t ) lbandrtk.frame.payload[ 6 ] << 16 ) | 
                        ( ( uint16_t ) lbandrtk.frame.payload[ 5 ] << 8 ) | lbandrtk.frame.payload[ 4 ] );
            log_printf( &logger, " Unique word: 0x%.8LX%.8LX\r\n", 
                        ( ( uint32_t ) lbandrtk.frame.payload[ 15 ] << 24 ) | ( ( uint32_t ) lbandrtk.frame.payload[ 14 ] << 16 ) | 
                        ( ( uint16_t ) lbandrtk.frame.payload[ 13 ] << 8 ) | lbandrtk.frame.payload[ 12 ], 
                        ( ( uint32_t ) lbandrtk.frame.payload[ 11 ] << 24 ) | ( ( uint32_t ) lbandrtk.frame.payload[ 10 ] << 16 ) | 
                        ( ( uint16_t ) lbandrtk.frame.payload[ 9 ] << 8 ) | lbandrtk.frame.payload[ 8 ] );
            log_printf( &logger, " Unique word bit errors: %u\r\n", ( uint16_t ) lbandrtk.frame.payload[ 19 ] );
            // Check the received message version
            if ( lbandrtk.frame.payload[ 0 ] )
            {
                log_printf( &logger, " FEC bits : %u\r\n", ( ( uint16_t ) lbandrtk.frame.payload[ 21 ] << 8 ) | lbandrtk.frame.payload[ 20 ] );
                log_printf( &logger, " Eb/N0 [dB] : %.3f\r\n", lbandrtk.frame.payload[ 22 ] * LBANDRTK_UBX_RXM_PMP_EBN0_SCALE );
            }
            else
            {
                log_printf( &logger, " FEC bits : %u\r\n", ( ( uint16_t ) lbandrtk.frame.payload[ 525 ] << 8 ) | lbandrtk.frame.payload[ 524 ] );
                log_printf( &logger, " Eb/N0 [dB] : %.3f\r\n", lbandrtk.frame.payload[ 526 ] * LBANDRTK_UBX_RXM_PMP_EBN0_SCALE );
            }
            log_printf( &logger, "\r\n Service ID : %u\r\n", ( ( uint16_t ) lbandrtk.frame.payload[ 17 ] << 8 ) | lbandrtk.frame.payload[ 16 ] );
            log_printf( &logger, " Spare byte: %u\r\n", ( uint16_t ) lbandrtk.frame.payload[ 18 ] );
            // Check the received message version
            if ( lbandrtk.frame.payload[ 0 ] )
            {
                // Get number of bytes for user data for message version 1
                num_bytes_user_data = ( ( uint16_t ) lbandrtk.frame.payload[ 3 ] << 8 ) | lbandrtk.frame.payload[ 2 ];
                if ( num_bytes_user_data > LBANDRTK_UBX_RXM_PMP_MAX_USER_DATA )
                {
                    num_bytes_user_data = LBANDRTK_UBX_RXM_PMP_MAX_USER_DATA;
                }
                log_printf( &logger, " User data bytes: %u\r\n", num_bytes_user_data );
                log_printf( &logger, " User data:\r\n" );
                for ( uint16_t cnt = 0; cnt < num_bytes_user_data; cnt++ )
                {
                    if ( 0 == ( cnt % 20 ) )
                    {
                        log_printf( &logger, "\r\n" );
                    }
                    log_printf( &logger, "%.2X ", ( uint16_t ) lbandrtk.frame.payload[ 24 + cnt ] );
                }
            }
            else
            {
                log_printf( &logger, " User data bytes: %u\r\n", num_bytes_user_data );
                log_printf( &logger, " User data:\r\n" );
                for ( uint16_t cnt = 0; cnt < num_bytes_user_data; cnt++ )
                {
                    if ( 0 == ( cnt % 20 ) )
                    {
                        log_printf( &logger, "\r\n" );
                    }
                    log_printf( &logger, " %.2X", ( uint16_t ) lbandrtk.frame.payload[ 20 + cnt ] );
                }
            }
            log_printf( &logger, "\r\n ----------------------------\r\n\n" );
            Delay_ms ( 100 );
        }
        else
        {
            log_printf( &logger, " ---- UBX FRAME RECEIVED ----\r\n" );
            log_printf( &logger, " Class ID: 0x%.2X\r\n", ( uint16_t ) lbandrtk.frame.class_id );
            log_printf( &logger, " Message ID: 0x%.2X\r\n", ( uint16_t ) lbandrtk.frame.msg_id );
            log_printf( &logger, " Payload length: %u\r\n", lbandrtk.frame.payload_len );
            log_printf( &logger, " Payload:" );
            for ( uint16_t cnt = 0; cnt < lbandrtk.frame.payload_len; cnt++ )
            {
                if ( 0 == ( cnt % 20 ) )
                {
                    log_printf( &logger, "\r\n" );
                }
                log_printf( &logger, " %.2X", ( uint16_t ) lbandrtk.frame.payload[ cnt ] );
            }
            log_printf( &logger, "\r\n ----------------------------\r\n\n" );
            Delay_ms ( 100 );
        }
    }
}

Note

Make sure to use a correct L-Band antenna and that it's placed outside on open-sky in order to be able to receive PMP data from satellites.

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LBANDRTK

Additional notes and informations

Depending on the development board you are using, you may need USB UART Click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Air quality 5 click

10

Air quality 5 click is a triple MOS sensor on a single Click board, which can detect gas pollution for a number of different gases. The onboard sensor is specially designed to detect the pollution from automobile exhausts as well as the gas pollution from the industrial or agricultural industry.

[Learn More]

Brushless 22 Click

0

Brushless 22 Click is a compact add-on board suitable for controlling brushless DC (BLDC) motors with any MCU. This board features the MTD6508, a 3-phase full-wave sensorless driver for BLDC motors from Microchip Technology. It features 180° sinusoidal drive, high torque output, and silent drive, rated for an operating voltage range including both mikroBUS™ power rails, and comes with speed control achieved through pulse-width modulation (PWM). Besides, it features several diagnostic circuits and drive-control functions such as motor lock protection, overcurrent limitation, and thermal shutdown protection.

[Learn More]

CapSense 2 Click

0

CapSense 2 Click is a compact add-on board that easily integrates projected capacitive touch into user's applications. This board features the CAP1114, a multi-channel capacitive touch sensor that takes human body capacitance as an input and directly provides the real-time sensor information via the I2C serial interface from Microchip. This board contains capacitive sensing elements, a 7-segment slider, two buttons, and four LED indicators that visually detect the activation on some of these parts. This Click board™ offers reliable and accurate sensing for any application that uses capacitive touch sensing functions.

[Learn More]