Skip to content

Commit 44c319b

Browse files
committed
Adding an option to use autoPVT when logging GNSS data
1 parent 6ee2be7 commit 44c319b

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

Firmware/OpenLog_Artemis/OpenLog_Artemis.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
(done) Add IMU accelerometer and gyro full scale and digital low pass filter settings to menuIMU
7474
(done) Add a fix to make sure the MS8607 is detected correctly: https://github.com/sparkfun/OpenLog_Artemis/issues/54
7575
(done) Add logMicroseconds: https://github.com/sparkfun/OpenLog_Artemis/issues/49
76+
(done) Add an option to use autoPVT when logging GNSS data: https://github.com/sparkfun/OpenLog_Artemis/issues/50
7677
*/
7778

7879
const int FIRMWARE_VERSION_MAJOR = 1;

Firmware/OpenLog_Artemis/autoDetect.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ void configureDevice(node * temp)
576576

577577
sensor->saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the current ioPortsettings to flash and BBR
578578

579-
//sensor->setAutoPVT(true); //Tell the GPS to "send" each solution
580-
sensor->setAutoPVT(false); //We will poll the device for PVT solutions
579+
sensor->setAutoPVT(nodeSetting->useAutoPVT); // Use autoPVT as required
580+
581581
if (1000000ULL / settings.usBetweenReadings <= 1) //If we are slower than 1Hz logging rate
582582
// setNavigationFrequency expects a uint8_t to define the number of updates per second
583583
// So the slowest rate we can set with setNavigationFrequency is 1Hz

Firmware/OpenLog_Artemis/menuAttachedDevices.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,13 +907,17 @@ void menuConfigure_uBlox(void *configPtr)
907907
if (sensorSetting->logpDOP == true) Serial.println(F("Enabled"));
908908
else Serial.println(F("Disabled"));
909909

910-
Serial.flush();
911-
912910
Serial.print(F("13) Log Interval Time Of Week (iTOW): "));
913911
if (sensorSetting->logiTOW == true) Serial.println(F("Enabled"));
914912
else Serial.println(F("Disabled"));
915913

916914
Serial.printf("14) Set I2C Interface Speed (u-blox modules have pullups built in. Remove *all* I2C pullups to achieve 400kHz): %d\r\n", sensorSetting->i2cSpeed);
915+
916+
Serial.print(F("15) Use autoPVT: "));
917+
if (sensorSetting->useAutoPVT == true) Serial.println(F("Yes"));
918+
else Serial.println(F("No"));
919+
920+
Serial.flush();
917921
}
918922
Serial.println(F("x) Exit"));
919923

@@ -956,6 +960,8 @@ void menuConfigure_uBlox(void *configPtr)
956960
else
957961
sensorSetting->i2cSpeed = 100000;
958962
}
963+
else if (incoming == 15)
964+
sensorSetting->useAutoPVT ^= 1;
959965
else if (incoming == STATUS_PRESSED_X)
960966
break;
961967
else if (incoming == STATUS_GETNUMBER_TIMEOUT)

Firmware/OpenLog_Artemis/nvm.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ void recordDeviceSettingsToFile()
474474
settingsFile.println((String)base + "logpDOP=" + nodeSetting->logpDOP);
475475
settingsFile.println((String)base + "logiTOW=" + nodeSetting->logiTOW);
476476
settingsFile.println((String)base + "i2cSpeed=" + nodeSetting->i2cSpeed);
477+
settingsFile.println((String)base + "useAutoPVT=" + nodeSetting->useAutoPVT);
477478
}
478479
break;
479480
case DEVICE_PROXIMITY_VCNL4040:
@@ -869,6 +870,8 @@ bool parseDeviceLine(char* str) {
869870
nodeSetting->logiTOW = d;
870871
else if (strcmp(deviceSettingName, "i2cSpeed") == 0)
871872
nodeSetting->i2cSpeed = d;
873+
else if (strcmp(deviceSettingName, "useAutoPVT") == 0)
874+
nodeSetting->useAutoPVT = d;
872875
else
873876
Serial.printf("Unknown device setting: %s\r\n", deviceSettingName);
874877
}

Firmware/OpenLog_Artemis/settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ struct struct_uBlox {
128128
bool logiTOW = false;
129129
uint32_t i2cSpeed = 100000; //Default to 100kHz for least number of CRC issues
130130
unsigned long powerOnDelayMillis = 1000; // Wait for at least this many millis before communicating with this device
131+
bool useAutoPVT = false; // Use autoPVT - to allow data collection at rates faster than GPS
131132
};
132133

133134
#define VL53L1X_DISTANCE_MODE_SHORT 0

0 commit comments

Comments
 (0)