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:
21:f91c0334d017
Parent:
17:6c226e3e9d61
Child:
22:d8cd4cf0fcc0
--- a/gnss.cpp	Fri Oct 05 18:46:48 2018 +0500
+++ b/gnss.cpp	Mon Oct 08 14:22:33 2018 +0500
@@ -330,6 +330,10 @@
 				return_value = UBX_NAV_ODO;
 			}
 			break;
+			case 0x03: {
+				return_value = NAV_STATUS;
+			}
+			break;
 			default:
 			{
 				return_value = UNKNOWN_UBX;
@@ -519,6 +523,37 @@
 	return return_decoded_msg;
 }
 
+tUBX_NAV_STATUS GnssParser::decode_ubx_nav_status_msg(char *buf) {
+
+	tUBX_NAV_STATUS return_decoded_msg;
+	uint8_t index = UBX_PAYLOAD_INDEX;
+
+	return_decoded_msg.itow = buf[index++];
+	return_decoded_msg.itow |= (buf[index++] << 8);
+	return_decoded_msg.itow |= (buf[index++] << 16);
+	return_decoded_msg.itow |= (buf[index++] << 24);
+
+	// move index flag
+	return_decoded_msg.fix = buf[index++];
+
+	return_decoded_msg.flags = buf[index++];
+
+	// move to ttff
+	index+=2;
+
+	return_decoded_msg.ttff = buf[index++];
+	return_decoded_msg.ttff |= (buf[index++] << 8);
+	return_decoded_msg.ttff |= (buf[index++] << 16);
+	return_decoded_msg.ttff |= (buf[index++] << 24);
+
+	return_decoded_msg.msss = buf[index++];
+	return_decoded_msg.msss |= (buf[index++] << 8);
+	return_decoded_msg.msss |= (buf[index++] << 16);
+	return_decoded_msg.msss |= (buf[index++] << 24);
+
+	return return_decoded_msg;
+}
+
 int GnssParser::ubx_request_batched_data(bool sendMonFirst) {
 	unsigned char ubx_log_retrieve_batch[]={0x00, 0x00, 0x00, 0x00};