Skip to content

Commit 451b3d5

Browse files
committed
Add LG290P configurePPP - web config needs more work
1 parent 249f9bd commit 451b3d5

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,14 @@
362362
<span class="icon-info-circle text-primary ms-2"></span>
363363
</span>
364364
</div>
365+
<div class="form-group row">
366+
<label for="configurePPP" class="box-margin20 col-sm-3 col-5 col-form-label">Configure
367+
PPP:</label>
368+
<div class="col-sm-8 col-6">
369+
<input type="text" class="form-control" id="configurePPP">
370+
<p id="configurePPPError" class="inlineError"></p>
371+
</div>
372+
</div>
365373
</div>
366374

367375
<div id="lg290pGnssSettings">

Firmware/RTK_Everywhere/AP-Config/src/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ function validateFields() {
876876
if (isElementShown("lg290pGnssSettings") == true) {
877877
checkElementValue("rtcmMinElev", -90, 90, "Must be between -90 and 90", "collapseGNSSConfig");
878878
}
879-
879+
if (ge("enableGalileoHas").checked == true) {
880+
checkElementString("configurePPP", 1, 30, "Must be 1 to 30 characters", "collapseGNSSConfig");
881+
}
880882
if (ge("enableNtripClient").checked == true) {
881883
checkElementString("ntripClientCasterHost", 1, 45, "Must be 1 to 45 characters", "collapseGNSSConfig");
882884
checkElementValue("ntripClientCasterPort", 1, 99999, "Must be 1 to 99999", "collapseGNSSConfig");

Firmware/RTK_Everywhere/GNSS_LG290P.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class GNSS_LG290P : GNSS
450450
// elevationDegrees: The elevation value in degrees
451451
bool setElevation(uint8_t elevationDegrees);
452452

453-
bool setHighAccuracyService(bool enableGalileoHas);
453+
bool setHighAccuracyService(bool enableGalileoHas, const char *configurePPP);
454454

455455
// Enable all the valid messages for this platform
456456
bool setMessages(int maxRetries);

Firmware/RTK_Everywhere/GNSS_LG290P.ino

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ bool GNSS_LG290P::configureRover()
412412
if (settings.debugGnss && response == false)
413413
systemPrintln("configureRover: Set rate failed");
414414

415-
response &= setHighAccuracyService(settings.enableGalileoHas);
415+
response &= setHighAccuracyService(settings.enableGalileoHas, (const char *)settings.configurePPP);
416416

417417
response &= enableRTCMRover();
418418
if (settings.debugGnss && response == false)
@@ -528,7 +528,7 @@ bool GNSS_LG290P::configureBase()
528528

529529
response &= setMinCnoRadio(settings.minCNO);
530530

531-
response &= setHighAccuracyService(settings.enableGalileoHas);
531+
response &= setHighAccuracyService(settings.enableGalileoHas, (const char *)settings.configurePPP);
532532

533533
response &= enableRTCMBase(); // Set RTCM messages
534534
if (settings.debugGnss && response == false)
@@ -1912,6 +1912,9 @@ void GNSS_LG290P::menuConstellations()
19121912
{
19131913
systemPrintf("%d) Galileo E6 Corrections: %s\r\n", MAX_LG290P_CONSTELLATIONS + 1,
19141914
settings.enableGalileoHas ? "Enabled" : "Disabled");
1915+
if (settings.enableGalileoHas)
1916+
systemPrintf("%d) PPP Configuration: \"%s\"\r\n", MAX_LG290P_CONSTELLATIONS + 2,
1917+
settings.configurePPP);
19151918
}
19161919

19171920
systemPrintln("x) Exit");
@@ -1928,6 +1931,10 @@ void GNSS_LG290P::menuConstellations()
19281931
{
19291932
settings.enableGalileoHas ^= 1;
19301933
}
1934+
else if ((incoming == MAX_LG290P_CONSTELLATIONS + 2) && present.galileoHasCapable && settings.enableGalileoHas)
1935+
{
1936+
getUserInputString(settings.configurePPP, sizeof(settings.configurePPP));
1937+
}
19311938
else if (incoming == INPUT_RESPONSE_GETNUMBER_EXIT)
19321939
break;
19331940
else if (incoming == INPUT_RESPONSE_GETNUMBER_TIMEOUT)
@@ -1939,7 +1946,7 @@ void GNSS_LG290P::menuConstellations()
19391946
// Apply current settings to module
19401947
gnss->setConstellations();
19411948

1942-
setHighAccuracyService(settings.enableGalileoHas);
1949+
setHighAccuracyService(settings.enableGalileoHas, (const char *)settings.configurePPP);
19431950

19441951
clearBuffer(); // Empty buffer of any newline chars
19451952
}
@@ -2415,7 +2422,7 @@ bool GNSS_LG290P::setElevation(uint8_t elevationDegrees)
24152422
}
24162423

24172424
//----------------------------------------
2418-
bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas)
2425+
bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas, const char *configurePPP)
24192426
{
24202427
bool result = true;
24212428

@@ -2429,7 +2436,9 @@ bool GNSS_LG290P::setHighAccuracyService(bool enableGalileoHas)
24292436
{
24302437
// $PQTMCFGPPP,W,2,1,120,0.10,0.15*68
24312438
// Enable E6 HAS, WGS84, 120 timeout, 0.10m Horizontal convergence accuracy threshold, 0.15m Vertical threshold
2432-
if (_lg290p->sendOkCommand("$PQTMCFGPPP", ",W,2,1,120,0.10,0.15") == true)
2439+
char paramConfigurePPP[sizeof(settings.configurePPP) + 4];
2440+
snprintf(paramConfigurePPP, sizeof(paramConfigurePPP), ",W,%s", configurePPP);
2441+
if (_lg290p->sendOkCommand("$PQTMCFGPPP", paramConfigurePPP) == true)
24332442
{
24342443
systemPrintln("Galileo E6 HAS service enabled");
24352444
}

Firmware/RTK_Everywhere/settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,7 @@ struct Settings
11111111
254}; // Mark first record with key so defaults will be applied. Int value for each supported message - Report
11121112
// rates for RTCM Base. Default to Quectel recommended rates.
11131113
int lg290pMessageRatesPQTM[MAX_LG290P_PQTM_MSG] = {254}; // Mark first record with key so defaults will be applied.
1114+
char configurePPP[30] = "2,1,120,0.10,0.15"; // PQTMCFGPPP: 2,1,120,0.10,0.15
11141115
#endif // COMPILE_LG290P
11151116

11161117
bool debugSettings = false;
@@ -1849,6 +1850,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
18491850
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRBaRT, MAX_LG290P_RTCM_MSG, & settings.lg290pMessageRatesRTCMBase, "messageRateRTCMBase_", gnssCmdUpdateMessageRates, },
18501851
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRRvRT, MAX_LG290P_RTCM_MSG, & settings.lg290pMessageRatesRTCMRover, "messageRateRTCMRover_", gnssCmdUpdateMessageRates, },
18511852
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRPqtm, MAX_LG290P_PQTM_MSG, & settings.lg290pMessageRatesPQTM, "messageRatePQTM_", gnssCmdUpdateMessageRates, },
1853+
{ 1, 1, 0, 0, 0, 0, 0, 0, 1, L29, 1, tCharArry, sizeof(settings.configurePPP), & settings.configurePPP, "configurePPP", nullptr, },
18521854
#endif // COMPILE_LG290P
18531855

18541856
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.debugSettings, "debugSettings", nullptr, },

0 commit comments

Comments
 (0)