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_operations.cpp
- Revision:
- 21:d8cd4cf0fcc0
- Parent:
- 20:f91c0334d017
- Child:
- 24:f538f1dc4121
--- a/gnss_operations.cpp Mon Oct 08 14:22:33 2018 +0500 +++ b/gnss_operations.cpp Tue Oct 16 16:09:41 2018 +0500 @@ -74,6 +74,61 @@ } +int GnssOperations::enable_ubx_nav_sat() { + int conf = RETRY; + unsigned char enable_ubx_nav_status[]={0x01, 0x35, 0x0A}; + conf = RETRY; + int length =0; + + while(conf) + { + + length = GnssSerial::sendUbx(0x06, 0x01, enable_ubx_nav_status, sizeof(enable_ubx_nav_status)); + if(length >= (int)(sizeof(enable_ubx_nav_status) + UBX_FRAME_SIZE)) + { + SEND_LOGGING_MESSAGE("UBX-NAV-STATUS was enabled\r\n"); + wait(1); + break; + } + else + { + SEND_LOGGING_MESSAGE("enabling UBX-NAV-STATUS...\r\n"); + conf = conf - 1; + } + } + + return (conf == 0) ? 0 : 1; + +} + +int GnssOperations::enable_ubx_nav_sol() { + int conf = RETRY; + unsigned char enable_ubx_nav_status[]={0x01, 0x06, 0x0A}; + conf = RETRY; + int length =0; + + while(conf) + { + + length = GnssSerial::sendUbx(0x06, 0x01, enable_ubx_nav_status, sizeof(enable_ubx_nav_status)); + if(length >= (int)(sizeof(enable_ubx_nav_status) + UBX_FRAME_SIZE)) + { + SEND_LOGGING_MESSAGE("UBX-NAV-STATUS was enabled\r\n"); + wait(1); + break; + } + else + { + SEND_LOGGING_MESSAGE("enabling UBX-NAV-STATUS...\r\n"); + conf = conf - 1; + } + } + + return (conf == 0) ? 0 : 1; + +} + + /** * * Disable UBX-NAV-PVT