gnssrtk4 2.2.0
Loading...
Searching...
No Matches
gnssrtk4


GNSS RTK 4 Click

GNSS RTK 4 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.


Click Library

  • Author : Stefan Filipovic
  • Date : Apr 2025.
  • Type : UART type

Software Support

Example Description

This example demonstrates the use of GNSS RTK 4 Click by reading and displaying the GNSS coordinates.

Example Libraries

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.GNSSRTK4

Example Key Functions

  • gnssrtk4_cfg_setup This function initializes Click configuration structure to initial values.
    void gnssrtk4_cfg_setup(gnssrtk4_cfg_t *cfg)
    GNSS RTK 4 configuration object setup function.
    GNSS RTK 4 Click configuration object.
    Definition gnssrtk4.h:161
  • gnssrtk4_init This function initializes all necessary pins and peripherals used for this Click board.
    err_t gnssrtk4_init(gnssrtk4_t *ctx, gnssrtk4_cfg_t *cfg)
    GNSS RTK 4 initialization function.
    GNSS RTK 4 Click context object.
    Definition gnssrtk4.h:138
  • gnssrtk4_generic_read This function reads a desired number of data bytes by using UART serial interface.
    err_t gnssrtk4_generic_read ( gnssrtk4_t *ctx, uint8_t *data_out, uint16_t len );
    err_t gnssrtk4_generic_read(gnssrtk4_t *ctx, uint8_t *data_out, uint16_t len)
    GNSS RTK 4 data reading function.
  • gnssrtk4_parse_gga This function parses the GGA data from the read response buffer.
    err_t gnssrtk4_parse_gga ( uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data );
    err_t gnssrtk4_parse_gga(uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
    GNSS RTK 4 parse GGA function.
  • gnssrtk4_reset_device This function resets the device by toggling the RST pin.
    void gnssrtk4_reset_device(gnssrtk4_t *ctx)
    GNSS RTK 4 reset device function.

Application Init

Initializes the driver and logger.

void application_init ( void )
{
log_cfg_t log_cfg;
gnssrtk4_cfg_t gnssrtk4_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
gnssrtk4_cfg_setup( &gnssrtk4_cfg );
GNSSRTK4_MAP_MIKROBUS( gnssrtk4_cfg, MIKROBUS_1 );
if ( UART_ERROR == gnssrtk4_init( &gnssrtk4, &gnssrtk4_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define GNSSRTK4_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition gnssrtk4.h:122
void application_init(void)
Definition main.c:82

Application Task

Reads the received data, parses the NMEA GGA info from it, and once it receives the position fix it will start displaying the coordinates on the USB UART.

void application_task ( void )
{
if ( GNSSRTK4_OK == gnssrtk4_process( &gnssrtk4 ) )
{
gnssrtk4_parser_application( app_buf );
}
}
@ GNSSRTK4_OK
Definition gnssrtk4.h:187
void application_task(void)
Definition main.c:112

Note

The Click board comes with the default baud rate of 460800, but the baud rate is set to 115200 in the library due to code portability and speed limitations of some MCUs. So in order to run the example you will need to adjust the baud rate using Quectel QGNSS evaluation software.

Application Output

This Click board can be interfaced and monitored in two ways:

  • Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
  • UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.

Additional Notes and Information

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.