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.
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 27:405a5e611635, committed 2018-11-26
- Comitter:
- fahim.alavi@u-blox.com
- Date:
- Mon Nov 26 16:59:49 2018 +0500
- Parent:
- 26:2876ec28d223
- Child:
- 28:8852ebda4e8f
- Commit message:
- GNSS configuration without aiding minimum Acq time set to 0 and baudrate reduced to normal
Changed in this revision
--- a/gnss.cpp Fri Nov 09 15:59:33 2018 +0500
+++ b/gnss.cpp Mon Nov 26 16:59:49 2018 +0500
@@ -292,7 +292,7 @@
int GnssParser::enable_ubx() {
- unsigned char ubx_cfg_prt[]={0x01, 0x00, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0x84, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,0x00, 0x00};
+ unsigned char ubx_cfg_prt[]={0x01, 0x00, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,0x00, 0x00};
int conf = RETRY;
int length = 0;
@@ -625,7 +625,7 @@
wait_ms(1000);
- baud(230400);
+ baud(115200);
// Send a byte to wakup the device again
putc(0xFF);
--- a/gnss.h Fri Nov 09 15:59:33 2018 +0500
+++ b/gnss.h Mon Nov 26 16:59:49 2018 +0500
@@ -338,8 +338,8 @@
GnssSerial(PinName tx GNSS_IF( = GNSSTXD, = D8 /* = D8 */), // resistor on shield not populated
PinName rx GNSS_IF( = GNSSRXD, = D9 /* = D9 */), // resistor on shield not populated
int baudrate GNSS_IF( = GNSSBAUD, = 9600 ),
- int rxSize = 256 ,
- int txSize = 128 );
+ int rxSize = 1024 ,
+ int txSize = 512 );
/** Destructor.
*/
--- a/gnss_operations.cpp Fri Nov 09 15:59:33 2018 +0500
+++ b/gnss_operations.cpp Mon Nov 26 16:59:49 2018 +0500
@@ -401,9 +401,10 @@
*
*
*/
-int GnssOperations::cfg_power_mode(Powermodes power_mode)
+int GnssOperations::cfg_power_mode(Powermodes power_mode, bool minimumAcqTimeZero)
{
int length = 0;
+ const int minimumAcqTime_index = 22;
unsigned char semi_continuous_pms[] = {0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned char semi_continuous_pm2[] = {0x02, 0x06, 0x00, 0x00, 0x02, 0x00, 0x43, 0x01, 0x10, 0x27, 0x00, 0x00, 0x10,
0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x01, 0x2C, 0x01, 0x00, 0x00, 0xCF, 0x40, 0x00,
@@ -437,6 +438,12 @@
SEND_LOGGING_MESSAGE("Configuring SEMI_CONTINOUS");
length = GnssSerial::sendUbx(0x06, 0x86, semi_continuous_pms, sizeof(semi_continuous_pms));
wait(1);
+
+ if(minimumAcqTimeZero) {
+ semi_continuous_pm2[minimumAcqTime_index] = 0x00;
+ semi_continuous_pm2[minimumAcqTime_index + 1] = 0x00;
+ }
+
length = GnssSerial::sendUbx(0x06, 0x3B, semi_continuous_pm2, sizeof(semi_continuous_pm2));
wait(1);
length = GnssSerial::sendUbx(0x06, 0x08, semi_continuous_rate, sizeof(semi_continuous_rate));
@@ -447,6 +454,12 @@
SEND_LOGGING_MESSAGE("Configuring AGGRESSIVE_CONTINUOS");
length = GnssSerial::sendUbx(0x06, 0x86, aggresive_continuous_pms, sizeof(aggresive_continuous_pms));
wait(1);
+
+ if(minimumAcqTimeZero) {
+ semi_continuous_pm2[minimumAcqTime_index] = 0x00;
+ semi_continuous_pm2[minimumAcqTime_index + 1] = 0x00;
+ }
+
length = GnssSerial::sendUbx(0x06, 0x3B, aggresive_continuous_pm2, sizeof(aggresive_continuous_pm2));
wait(1);
length = GnssSerial::sendUbx(0x06, 0x08, aggressive_continuous_rate, sizeof(aggressive_continuous_rate));
@@ -457,6 +470,12 @@
SEND_LOGGING_MESSAGE("Configuring CONSERVATIVE_CONTINOUS");
length = GnssSerial::sendUbx(0x06, 0x86, conservative_continuous_pms, sizeof(conservative_continuous_pms));
wait(1);
+
+ if(minimumAcqTimeZero) {
+ semi_continuous_pm2[minimumAcqTime_index] = 0x00;
+ semi_continuous_pm2[minimumAcqTime_index + 1] = 0x00;
+ }
+
length = GnssSerial::sendUbx(0x06, 0x3B, conservative_continuous_pm2, sizeof(conservative_continuous_pm2));
wait(1);
length = GnssSerial::sendUbx(0x06, 0x08, conservative_continuous_rate, sizeof(conservative_continuous_rate));
--- a/gnss_operations.h Fri Nov 09 15:59:33 2018 +0500 +++ b/gnss_operations.h Mon Nov 26 16:59:49 2018 +0500 @@ -157,11 +157,12 @@ * CONSERVATIVE_CONTINOUS * FULL_POWER * FULL_POWER_BLOCK_LEVEL + * minimumAcqTime boolean * * @return int 1: Successful * 0: Failure */ - int cfg_power_mode(Powermodes power_mode); + int cfg_power_mode(Powermodes power_mode, bool minimumAcqTime); /** Method to poll the GNSS configuration * @param void