Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: pulga-lorawan-drv Si1133 BME280
Diff: gps.txt
- Revision:
- 62:89df9529dbb0
- Parent:
- 61:65744bc8ab55
--- a/gps.txt Fri Jan 08 20:16:58 2021 +0000
+++ b/gps.txt Fri Feb 26 17:07:12 2021 +0000
@@ -666,6 +666,23 @@
//lon=Data.lon;
}
+void gps_get_lat_lon(int *latitude, int *logitude){
+ uint8_t packet_nav_pvt[] = { 0xB5, 0x62, 0x01, 0x07, 0x00, 0x00, 0x08, 0x19};
+
+ //=============envia pacote nav pvt
+ for ( int i=0; i< sizeof(packet_nav_pvt) ; i++){
+ spi_2.write(packet_nav_pvt[i]);
+ wait_ms(20);
+ }
+
+ gps_navPVT Data = le_nav_pvt();
+
+ //printf ("gps lat=%d lon=%d \n",Data.lat ,Data.lon );
+ latitude = &(int)Data.lat;
+ longitude = &(int)Data.lon;
+ return;
+}
+
void gps_config (){
gps_DSEL = 0;
//spi gps configuration