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.
Fork of gnss by
Diff: gnss.cpp
- Revision:
- 20:f91c0334d017
- Parent:
- 16:6c226e3e9d61
- Child:
- 21:d8cd4cf0fcc0
diff -r bc678f383db1 -r f91c0334d017 gnss.cpp
--- 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};

