GNSS 8 click
GNSS 8 Click is a compact add-on board that provides fast positioning capability. This board features the LC79DA, a high-performance dual-band and multi-constellation GNSS module from Quectel Wireless Solutions.
click Product page
Click library
- Author : Luka Filipovic
- Date : Jun 2021.
- Type : UART type
Software Support
We provide a library for the GNSS8 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 GNSS8 Click driver.
Standard key functions :
gnss8_cfg_setup
Config Object Initialization function.
void gnss8_cfg_setup(gnss8_cfg_t *cfg)
GNSS 8 configuration object setup function.
GNSS 8 Click configuration object.
Definition gnss8.h:126
gnss8_init
Initialization function.
err_t gnss8_init(gnss8_t *ctx, gnss8_cfg_t *cfg)
GNSS 8 initialization function.
GNSS 8 Click context object.
Definition gnss8.h:103
Example key functions :
gnss8_generic_read
Data reading function.
err_t gnss8_generic_read(gnss8_t *ctx, char *data_buf, uint16_t max_len)
Data reading function.
gnss8_generic_write
Data writing function.
err_t gnss8_generic_write(gnss8_t *ctx, char *data_buf, uint16_t len)
Data writing function.
gnss8_set_ap_req
Set AP request pin state.
void gnss8_set_ap_req(gnss8_t *ctx, uint8_t state)
Set AP request pin state.
Example Description
This example showcases device abillity to read data outputed
from device and show it's coordinates and altitude when connected.
The demo application is composed of two sections :
Application Init
Initializes host communication modules, additioaln GPIO's used
for control of device and resets device.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
err_t init_flag =
gnss8_init( &gnss8, &gnss8_cfg );
if ( UART_ERROR == init_flag )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
gnss8_clear_app_buf( );
log_info( &logger, " Application Task " );
}
#define GNSS8_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition gnss8.h:87
void application_init(void)
Definition main.c:103
Application Task
Reads data from device and wait's untill device is connected.
While not connected it will log '.'. When conneceted and received data for latitude, longitude, and altitude it will log that data parsed from "GNGGA" command.
{
gnss8_process();
latitude_data );
longitude_data );
altitude_data );
{
{
log_printf( &logger, "\r\n" );
}
log_printf( &logger, ">Latitude:\r\n - deg: %.2s \r\n - min: %s\r\n",
latitude_data, &latitude_data[ 2 ] );
log_printf( &logger, ">Longitude:\r\n - deg: %.3s \r\n - min: %s\r\n",
longitude_data, &longitude_data[ 3 ] );
log_printf( &logger, ">Altitude:\r\n - %sm\r\n",
altitude_data );
log_printf( &logger, "----------------------------------------\r\n" );
}
{
{
log_printf( &logger, "Waiting for data " );
}
log_printf( &logger, "." );
}
{
gnss8_clear_app_buf( );
}
}
@ GNSS8_OK
Definition gnss8.h:152
@ GNSS8_ERROR
Definition gnss8.h:153
void application_task(void)
Definition main.c:137
#define RSP_GNGGA_LONGITUDE_ELEMENT
Definition main.c:42
#define RSP_GNGGA_LATITUDE_ELEMENT
Definition main.c:41
#define RSP_GNGGA_ALTITUDE_ELEMENT
Definition main.c:43
#define RSP_GNGGA
Definition main.c:37
err_t last_error_flag
Definition main.c:56
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.GNSS8
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.