GPS Click Board
GPS Click Board
The GPS Click Board™ is a compact solution for adding GPS functionality to your device. It carries the u-blox LEA-6S high-performance position engine.
The GPS Click Board™ is designed to run on a 3.3V power supply and communicates with the target MCU through UART or I2C interface.
Data can also be acquired through a PC application using the USB connection.
Software Support
Code examples for the GPS Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
CODE SNIPPET
This snippet shows the procedure for parsing a string received by the GPS module. Library for GPS implements RX buffer which stores characters coming from the GPS device. The parser will detect when a complete sentence has been provided and parse it into its respective elements. This library is usable on various types of GPS devices.
1 void parse_gps( int *lat, int *lon ) 2 { 3 char *string = strstr(txt,"$GPGLL"); 4 if( string != 0 ) { 5 if( string[7] != ',' ) { 6 *lat = ( string[7] - 48 )*10 + ( string[8] - 48 ); 7 *lon = ( string[19] - 48 )*100 + ( string[20] - 48 )*10 + ( string[21] - 48 ); 8 9 if( string[17] == 'S' ) 10 *lat = 0 - latitude; 11 if(string[31] == 'W') 12 *lon = 0 - longitude; 13 } 14 } 15 }
GPS Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.