Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Firmware/RTK_Everywhere/AP-Config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
</div>
</div>

<div id="useMSM7Setting">
<div id="lg290pGnssSettings">
<div class="form-check mt-3">
<label class="form-check-label" for="useMSM7">MSM7 RTCM Selection</label>
<input class="form-check-input" type="checkbox" value="" id="useMSM7">
Expand All @@ -372,6 +372,21 @@
<span class="icon-info-circle text-primary ms-2"></span>
</span>
</div>

<div class="form-group row" id="rtcmMinElevConfig">
<div class="form-group row">
<label for="rtcmMinElev" class="col-sm-4 col-6 col-form-label">Min SV Elevation for RTCM:
<span class="tt" data-bs-placement="right"
title="Minimum elevation in degrees for a GNSS satellite to be used for RTCM corrections.">
<span class="icon-info-circle text-primary ms-2"></span>
</span>
</label>
<div class="col-sm-4 col-6">
<input type="number" class="form-control" id="rtcmMinElev">
<p id="rtcmMinElevError" class="inlineError"></p>
</div>
</div>
</div>
</div>

<div class="form-check mt-3">
Expand Down
32 changes: 21 additions & 11 deletions Firmware/RTK_Everywhere/AP-Config/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function parseIncoming(msg) {
hide("externalPortOptions");
show("logToSDCard");
hide("galileoHasSetting");
hide("useMSM7Setting");
hide("lg290pGnssSettings");
hide("tiltConfig");
hide("beeperControl");
show("measurementRateInput");
Expand Down Expand Up @@ -146,7 +146,7 @@ function parseIncoming(msg) {
show("externalPortOptions");
show("logToSDCard");
hide("galileoHasSetting");
hide("useMSM7Setting");
hide("lg290pGnssSettings");
hide("tiltConfig");
hide("beeperControl");
show("measurementRateInput");
Expand All @@ -167,7 +167,7 @@ function parseIncoming(msg) {
show("externalPortOptions");
show("logToSDCard");
hide("galileoHasSetting");
hide("useMSM7Setting");
hide("lg290pGnssSettings");
hide("tiltConfig");
hide("beeperControl");
hide("measurementRateInput");
Expand Down Expand Up @@ -257,8 +257,8 @@ function parseIncoming(msg) {
show("externalPortOptions");
show("logToSDCard");

hide("galileoHasSetting");
show("useMSM7Setting");
show("galileoHasSetting");
show("lg290pGnssSettings");
hide("tiltConfig");
hide("beeperControl");

Expand All @@ -273,8 +273,8 @@ function parseIncoming(msg) {
show("constellationNavic");

hide("dynamicModelDropdown"); //Not supported on LG290P
hide("minElevConfig"); //Not supported on LG290P
hide("minCNOConfig"); //Not supported on LG290P
show("minElevConfig");
show("minCNOConfig");

ge("rtcmRateInfoText").setAttribute('data-bs-original-title', 'RTCM is transmitted by the base at a default of 1Hz for messages 1005, 1074, 1084, 1094, 1114, 1124, 1134. This can be lowered for radios with low bandwidth or tailored to transmit any/all RTCM messages. Limits: 0 to 20. Note: The measurement rate is overridden to 1Hz when in Base mode.');

Expand Down Expand Up @@ -327,8 +327,8 @@ function parseIncoming(msg) {

hide("constellationSbas"); //Not supported on LG290P
show("constellationNavic");
hide("galileoHasSetting"); //Not supported on LG290P
show("useMSM7Setting");
show("galileoHasSetting");
show("lg290pGnssSettings");
hide("tiltConfig"); //Not supported on Torch X2

show("measurementRateInput");
Expand All @@ -341,8 +341,8 @@ function parseIncoming(msg) {
hide("enableNmeaOnRadio");

hide("dynamicModelDropdown"); //Not supported on LG290P
hide("minElevConfig"); //Not supported on LG290P
hide("minCNOConfig"); //Not supported on LG290P
show("minElevConfig");
show("minCNOConfig");

ge("rtcmRateInfoText").setAttribute('data-bs-original-title', 'RTCM is transmitted by the base at a default of 1Hz for messages 1005, 1074, 1084, 1094, 1124, and 0.1Hz for 1033. This can be lowered for radios with low bandwidth or tailored to transmit any/all RTCM messages. Limits: 0 to 20. Note: The measurement rate is overridden to 1Hz when in Base mode.');

Expand Down Expand Up @@ -714,6 +714,13 @@ function show(id) {
ge(id).style.display = "block";
}

function isElementShown(id) {
if (ge(id).style.display == "block") {
return (true);
}
return (false);
}

//Create CSV of all setting data
function sendData() {
var settingCSV = "";
Expand Down Expand Up @@ -841,6 +848,9 @@ function validateFields() {

checkElementValue("minElev", 0, 90, "Must be between 0 and 90", "collapseGNSSConfig");
checkElementValue("minCNO", 0, 90, "Must be between 0 and 90", "collapseGNSSConfig");
if (isElementShown("lg290pGnssSettings") == true) {
checkElementValue("rtcmMinElev", -90, 90, "Must be between -90 and 90", "collapseGNSSConfig");
}

if (ge("enableNtripClient").checked == true) {
checkElementString("ntripClientCasterHost", 1, 45, "Must be 1 to 45 characters", "collapseGNSSConfig");
Expand Down
39 changes: 32 additions & 7 deletions Firmware/RTK_Everywhere/GNSS_LG290P.ino
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ void GNSS_LG290P::begin()
lg290pFirmwareVersion, gnssFirmwareVersion);

// Determine if the "LG290P03AANR01A03S_PPP_TEMP0812 2025/08/12" firmware is present
// This version has support for testing out E6/HAS PPP, but confusingly was released after v05.
// Or "LG290P03AANR01A06S_PPP_TEMP0829 2025/08/29 17:08:39"
// The 03S_PPP_TEMP version has support for testing out E6/HAS PPP, but confusingly was released after v05.
if (strstr(gnssFirmwareVersion, "PPP_TEMP") != nullptr)
{
present.galileoHasCapable = true;
Expand Down Expand Up @@ -793,6 +794,8 @@ bool GNSS_LG290P::enableRTCMBase()

int portNumber = 1;

int minimumRtcmRate = 1000;

while (portNumber < 4)
{
for (int messageNumber = 0; messageNumber < MAX_LG290P_RTCM_MSG; messageNumber++)
Expand Down Expand Up @@ -843,7 +846,12 @@ bool GNSS_LG290P::enableRTCMBase()

// If any message is enabled, enable RTCM output
if (settings.lg290pMessageRatesRTCMBase[messageNumber] > 0)
{
enableRTCM = true;
// Capture the message with the lowest rate
if (settings.lg290pMessageRatesRTCMBase[messageNumber] < minimumRtcmRate)
minimumRtcmRate = settings.lg290pMessageRatesRTCMBase[messageNumber];
}
}
}

Expand All @@ -857,11 +865,14 @@ bool GNSS_LG290P::enableRTCMBase()
if (enableRTCM == true)
{
if (settings.debugGnss)
systemPrintln("Enabling Base RTCM output");
systemPrintf("Enabling Base RTCM MSM%c output with rate of %d\r\n",
settings.useMSM7 ? '7' : '4', minimumRtcmRate);

// PQTMCFGRTCM fails to respond with OK over UART2 of LG290P, so don't look for it
char cfgRtcm[40];
snprintf(cfgRtcm, sizeof(cfgRtcm), "PQTMCFGRTCM,W,%c,0,-90,07,06,2,1", settings.useMSM7 ? '7' : '4');
snprintf(cfgRtcm, sizeof(cfgRtcm), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d",
settings.useMSM7 ? '7' : '4', settings.rtcmMinElev,
minimumRtcmRate);
_lg290p->sendOkCommand(
cfgRtcm); // Enable MSM4/7, output regular intervals, interval (seconds)
}
Expand Down Expand Up @@ -1016,15 +1027,16 @@ bool GNSS_LG290P::enableRTCMRover()
if (enableRTCM == true)
{
if (settings.debugCorrections)
systemPrintf("Enabling Rover RTCM MSM output with rate of %d\r\n", minimumRtcmRate);
systemPrintf("Enabling Rover RTCM MSM%c output with rate of %d\r\n",
settings.useMSM7 ? '7' : '4', minimumRtcmRate);

// Enable MSM4/7 (for faster PPP CSRS results), output at a rate equal to the minimum RTCM rate (EPH Mode = 2)
// PQTMCFGRTCM, W, <MSM_Type>, <MSM_Mode>, <MSM_ElevThd>, <Reserved>, <Reserved>, <EPH_Mode>, <EPH_Interval>
// Set MSM_ElevThd to 15 degrees from rftop suggestion

char msmCommand[40] = {0};
snprintf(msmCommand, sizeof(msmCommand), "PQTMCFGRTCM,W,%c,0,15,07,06,2,%d",
settings.useMSM7 ? '7' : '4', minimumRtcmRate);
snprintf(msmCommand, sizeof(msmCommand), "PQTMCFGRTCM,W,%c,0,%d,07,06,2,%d",
settings.useMSM7 ? '7' : '4', settings.rtcmMinElev, minimumRtcmRate);

// PQTMCFGRTCM fails to respond with OK over UART2 of LG290P, so don't look for it
_lg290p->sendOkCommand(msmCommand);
Expand Down Expand Up @@ -1921,6 +1933,8 @@ void GNSS_LG290P::menuMessages()

if (namedSettingAvailableOnPlatform("useMSM7")) // Redundant - but good practice for code reuse
systemPrintf("13) MSM Selection: MSM%c\r\n", settings.useMSM7 ? '7' : '4');
if (namedSettingAvailableOnPlatform("rtcmMinElev")) // Redundant - but good practice for code reuse
systemPrintf("14) Minimum Elevation for RTCM: %d\r\n", settings.rtcmMinElev);

systemPrintln("x) Exit");

Expand Down Expand Up @@ -1997,6 +2011,17 @@ void GNSS_LG290P::menuMessages()
}
else if ((incoming == 13) && (namedSettingAvailableOnPlatform("useMSM7"))) // Redundant - but good practice for code reuse)
settings.useMSM7 ^= 1;
else if ((incoming == 14) && (namedSettingAvailableOnPlatform("rtcmMinElev")))
{
systemPrintf("Enter minimum elevation for RTCM: ");

int elevation = getUserInputNumber(); // Returns EXIT, TIMEOUT, or long

if (elevation >= -90 && elevation <= 90)
{
settings.rtcmMinElev = elevation;
}
}

else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
break;
Expand Down Expand Up @@ -2353,7 +2378,7 @@ bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas)
{
bool result = true;

// E6 reception requires version v03 with 'PPP_TEMP' in firmware title
// E6 reception requires version v03/v06 with 'PPP_TEMP' in firmware title
// Present is set during LG290P begin()
if (present.galileoHasCapable == false)
return (result); // We are unable to set this setting to report success
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/HTTP_Client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ void httpClientUpdate()
}

// Periodically display the HTTP client state
if (PERIODIC_DISPLAY(PD_HTTP_CLIENT_STATE))
if (PERIODIC_DISPLAY(PD_HTTP_CLIENT_STATE) && !inMainMenu)
{
const char *line = "";
httpClientEnabled(&line);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/MQTT_Client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ void mqttClientUpdate()
}

// Periodically display the MQTT client state
if (PERIODIC_DISPLAY(PD_MQTT_CLIENT_STATE))
if (PERIODIC_DISPLAY(PD_MQTT_CLIENT_STATE) && !inMainMenu)
{
const char *line = "";
mqttClientEnabled(&line);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/NTP.ino
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ void ntpServerUpdate()
}

// Periodically display the NTP server state
if (PERIODIC_DISPLAY(PD_NTP_SERVER_STATE))
if (PERIODIC_DISPLAY(PD_NTP_SERVER_STATE) && !inMainMenu)
{
const char * line = "";
if (NEQ_RTK_MODE(ntpServerMode))
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/NtripClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ void ntripClientUpdate()
}

// Periodically display the NTRIP client state
if (PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE))
if (PERIODIC_DISPLAY(PD_NTRIP_CLIENT_STATE) && !inMainMenu)
{
systemPrintf("NTRIP Client state: %s%s\r\n", ntripClientStateName[ntripClientState], line);
PERIODIC_CLEAR(PD_NTRIP_CLIENT_STATE);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/NtripServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ void ntripServerUpdate(int serverIndex)
}

// Periodically display the state
if (PERIODIC_DISPLAY(PD_NTRIP_SERVER_STATE))
if (PERIODIC_DISPLAY(PD_NTRIP_SERVER_STATE) && !inMainMenu)
{
systemPrintf("NTRIP Server %d state: %s%s\r\n", serverIndex,
ntripServerStateName[ntripServer->state], line);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/PointPerfectLibrary.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void updatePplTask(void *e)
while (task.updatePplTaskStopRequest == false)
{
// Display an alive message
if (PERIODIC_DISPLAY(PD_TASK_UPDATE_PPL))
if (PERIODIC_DISPLAY(PD_TASK_UPDATE_PPL) && !inMainMenu)
{
PERIODIC_CLEAR(PD_TASK_UPDATE_PPL);
systemPrintln("UpdatePplTask running");
Expand Down
5 changes: 3 additions & 2 deletions Firmware/RTK_Everywhere/States.ino
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,11 @@ typedef struct _RTK_MODE_ENTRY
} RTK_MODE_ENTRY;

const RTK_MODE_ENTRY stateModeTable[] = {{"Rover", STATE_ROVER_NOT_STARTED, STATE_ROVER_RTK_FIX},
{"Base Caster", STATE_BASE_CASTER_NOT_STARTED, STATE_BASE_CASTER_NOT_STARTED},
{"Base", STATE_BASE_NOT_STARTED, STATE_BASE_FIXED_TRANSMITTING},
{"Setup", STATE_DISPLAY_SETUP, STATE_PROFILE},
{"ESPNOW Pairing", STATE_ESPNOW_PAIRING_NOT_STARTED, STATE_ESPNOW_PAIRING},
{"Setup", STATE_DISPLAY_SETUP, STATE_PROFILE}, // Covers SETUP, WEB_CONFIG, TEST
{"Provisioning", STATE_KEYS_REQUESTED, STATE_KEYS_REQUESTED},
{"ESPNOW Pairing", STATE_ESPNOW_PAIRING_NOT_STARTED, STATE_ESPNOW_PAIRING},
{"NTP", STATE_NTPSERVER_NOT_STARTED, STATE_NTPSERVER_SYNC},
{"Shutdown", STATE_SHUTDOWN, STATE_SHUTDOWN}};
const int stateModeTableEntries = sizeof(stateModeTable) / sizeof(stateModeTable[0]);
Expand Down
10 changes: 10 additions & 0 deletions Firmware/RTK_Everywhere/System.ino
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,16 @@ void printReports()
if (bluetoothCommandIsConnected() == true)
return;

if (inMainMenu)
return;

// Periodically display the firmware mode
if (PERIODIC_DISPLAY(PD_FIRMWARE_MODE))
{
PERIODIC_CLEAR(PD_FIRMWARE_MODE);
systemPrintf("Firmware mode: %s\r\n", stateToRtkMode(systemState));
}

// Periodically print the position
if (settings.enablePrintPosition && ((millis() - lastPrintPosition) > 15000))
{
Expand Down
Loading