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
Diff: gnss_operations.cpp
- Revision:
- 18:7adca4350499
- Parent:
- 16:cb9861f0f4d8
- Child:
- 19:119e7c15ff97
--- a/gnss_operations.cpp Mon Sep 03 14:39:27 2018 +0500 +++ b/gnss_operations.cpp Wed Sep 12 16:03:01 2018 +0500 @@ -87,9 +87,9 @@ int length =0; //convert unsigned int acc to hex //ask if positioning mask or time accuracy mask - unsigned char ubx_cfg_nav5[]={0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, EXTRACT_BYTE(0, FIRST_BYTE, acc), EXTRACT_BYTE(1, SECOND_BYTE, acc), - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00}; + unsigned char ubx_cfg_nav5[]={0xFF, 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, + 0x0A, 0x00, 0xFA, 0x00,0xFA, 0x00, EXTRACT_BYTE(0, FIRST_BYTE, acc), EXTRACT_BYTE(1, SECOND_BYTE, acc), + 0x5E, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00}; while(conf) { @@ -341,7 +341,13 @@ unsigned char conservative_continuous_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; unsigned char full_power_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - unsigned char full_power_rate[] = {0x06, 0x00, 0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + unsigned char full_power_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + + unsigned char full_power_block_level_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + unsigned char full_power_block_level_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + + unsigned char full_power_building_level_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + unsigned char full_power_building_level_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; switch (power_mode) { @@ -378,6 +384,18 @@ wait(5); length = GnssSerial::sendUbx(0x06, 0x08, full_power_rate, sizeof(full_power_rate)); break; + case FULL_POWER_BLOCK_LEVEL: + SEND_LOGGING_MESSAGE("Configuring FULL_POWER_BLOCK_LEVEL"); + length = GnssSerial::sendUbx(0x06, 0x86, full_power_block_level_pms, sizeof(full_power_block_level_pms)); + wait(5); + length = GnssSerial::sendUbx(0x06, 0x08, full_power_block_level_rate, sizeof(full_power_block_level_rate)); + break; + case FULL_POWER_BUILDING_LEVEL: + SEND_LOGGING_MESSAGE("Configuring FULL_POWER_BUILDING_LEVEL"); + length = GnssSerial::sendUbx(0x06, 0x86, full_power_building_level_pms, sizeof(full_power_building_level_pms)); + wait(5); + length = GnssSerial::sendUbx(0x06, 0x08, full_power_building_level_rate, sizeof(full_power_building_level_rate)); + break; } return (length >= (int)(sizeof(semi_continuous_pms) + UBX_FRAME_SIZE)) ? 1 : 0; }