You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Turn on RTCM so that we can harvest RTCM over I2C and send out over WiFi
52
-
//This is easier than parsing over UART because the library handles the frame detection
53
-
getPortSettings(COM_PORT_I2C); //Load the settingPayload with this port's settings
54
-
if (settingPayload[OUTPUT_SETTING] != (COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3))
55
-
response &= i2cGNSS.setPortOutput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); //Set the I2C port to output UBX (config), and RTCM3 (casting)
56
-
//response &= i2cGNSS.setPortOutput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_RTCM3); //Not a valid state. Goes to UBX+NMEA+RTCM3
35
+
response &= i2cGNSS.addCfgValset8(UBLOX_CFG_NAVSPG_DYNMODEL, (dynModel)settings.dynamicModel); // Set dynamic model
57
36
58
-
//In base mode the Surveyor should output RTCM over all ports:
37
+
//In base mode the RTK device should output RTCM over all ports:
59
38
//(Primary) UART2 in case the Surveyor is connected via radio to rover
60
39
//(Optional) I2C in case user wants base to connect to WiFi and NTRIP Caster
61
40
//(Seconday) USB in case the Surveyor is used as an NTRIP caster connected to SBC or other
62
41
//(Tertiary) UART1 in case Surveyor is sending RTCM to phone that is then NTRIP Caster
63
-
response &= enableRTCMSentences(COM_PORT_UART2);
64
-
response &= enableRTCMSentences(COM_PORT_UART1);
65
-
response &= enableRTCMSentences(COM_PORT_USB);
66
-
response &= enableRTCMSentences(COM_PORT_I2C); //Enable for plain radio so we can count RTCM packets for display
67
-
68
-
//If enabled, adjust GSV NMEA to be reported at 1Hz
69
-
if (settings.ubxMessages[8].msgRate > baseNavigationFrequency)
70
-
setMessageRateByName("UBX_NMEA_GSV", baseNavigationFrequency); //Update GSV setting in file
71
-
72
-
response &= configureGNSSMessageRates(COM_PORT_UART1, settings.ubxMessages); //In the interest of logging, make sure the appropriate messages are enabled
bool response = i2cGNSS.enableSurveyMode(settings.observationSeconds, settings.observationPositionAccuracy, 5000); //Enable Survey in, with user parameters. Wait up to 5s.
// While the module is _locking_ to GNSS time, turn off pulse
723
-
timePulseParameters.freqPeriod = 1000000; //Set the period between pulses in us
724
-
timePulseParameters.pulseLenRatio = 0; //Set the pulse length in us
668
+
response &= i2cGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_TP1, 1000000); //Set the period between pulses in us
669
+
response &= i2cGNSS.addCfgValset32(UBLOX_CFG_TP_LEN_TP1, 0); //Set the pulse length in us
725
670
726
671
// When the module is _locked_ to GNSS time, make it generate 1kHz
727
-
timePulseParameters.freqPeriodLock = settings.externalPulseTimeBetweenPulse_us; //Set the period between pulses is us
728
-
timePulseParameters.pulseLenRatioLock = settings.externalPulseLength_us; //Set the pulse length in us
729
-
730
-
timePulseParameters.flags.bits.active = settings.enableExternalPulse; //Make sure the active flag is set to enable the time pulse. (Set to 0 to disable.)
731
-
timePulseParameters.flags.bits.lockedOtherSet = 1; //Tell the module to use freqPeriod while locking and freqPeriodLock when locked to GNSS time
732
-
timePulseParameters.flags.bits.isFreq = 0; //Tell the module that we want to set the period
733
-
timePulseParameters.flags.bits.isLength = 1; //Tell the module that pulseLenRatio is a length (in us)
734
-
timePulseParameters.flags.bits.polarity = (uint8_t)settings.externalPulsePolarity; //Rising or failling edge type pulse
672
+
response &= i2cGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_LOCK_TP1, settings.externalPulseTimeBetweenPulse_us); //Set the period between pulses is us
673
+
response &= i2cGNSS.sendCfgValset32(UBLOX_CFG_TP_LEN_LOCK_TP1, settings.externalPulseLength_us); //Set the pulse length in us
735
674
736
-
if (i2cGNSS.setTimePulseParameters(&timePulseParameters, 1000) == false)
0 commit comments