This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.

Dependents:   example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more

Revision:
10:bfa9081e1d14
Parent:
9:cff83b9f5093
Child:
12:a04f7eeece23
--- a/gnss.cpp	Fri May 18 13:29:00 2018 +0500
+++ b/gnss.cpp	Mon May 21 17:18:35 2018 +0500
@@ -295,6 +295,10 @@
 			conf = conf - 1;
 		}
 	}
+	if(conf == 0)
+	{
+		return 1;
+	}
 
 	unsigned char enable_ubx_nav_pvt[]={0x01, 0x07, 0x01};
 	conf = RETRY;
@@ -536,6 +540,34 @@
 
 	return return_decoded_msg;
 }
+
+int GnssParser::ubx_request_batched_data(bool sendMonFirst) {
+	unsigned char ubx_log_retrieve_batch[]={0x00, 0x00, 0x00, 0x00};
+
+	ubx_log_retrieve_batch[1] = (sendMonFirst == true) ? 0x01 : 0x00;
+
+	int conf = RETRY;
+	while(conf)
+	{
+
+		int length = sendUbx(0x21, 0x10, ubx_log_retrieve_batch, sizeof(ubx_log_retrieve_batch));
+		if(length >= (int)(sizeof(ubx_log_retrieve_batch) + UBX_FRAME_SIZE))
+		{
+			wait(5);
+			break;
+		}
+		else
+		{
+			conf = conf - 1;
+		}
+	}
+	if(conf == 0)
+	{
+		return 1;
+	}
+
+	return 0;
+}
                 
 const char GnssParser::_toHex[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' };