@@ -33,13 +33,14 @@ void um980Begin()
33
33
if (settings.debugGnss == true )
34
34
um980EnableDebugging ();
35
35
36
- // In order to reduce UM980 configuration time, the UM980 library blocks the start of BESTNAV and RECTIME until 3D fix is achieved
37
- // However, if all NMEA messages are disabled, the UM980 will never detect a 3D fix.
36
+ // In order to reduce UM980 configuration time, the UM980 library blocks the start of BESTNAV and RECTIME until 3D
37
+ // fix is achieved However, if all NMEA messages are disabled, the UM980 will never detect a 3D fix.
38
38
if (um980IsGgaActive () == true )
39
- // If NMEA GPGGA is turned on, suppress BESTNAV messages until GPGGA reports a 3D fix
39
+ // If NMEA GPGGA is turned on, suppress BESTNAV messages until GPGGA reports a 3D fix
40
40
um980->disableBinaryBeforeFix ();
41
41
else
42
- // If NMEA GPGGA is turned off, enable BESTNAV messages at power on which may lead to longer UM980 configuration times
42
+ // If NMEA GPGGA is turned off, enable BESTNAV messages at power on which may lead to longer UM980 configuration
43
+ // times
43
44
um980->enableBinaryBeforeFix ();
44
45
45
46
if (um980->begin (*serialGNSS) == false ) // Give the serial port over to the library
@@ -169,48 +170,6 @@ bool um980ConfigureOnce()
169
170
}
170
171
}
171
172
172
- // Enable E6 and PPP if enabled and possible
173
- if (settings.enableGalileoHas == true )
174
- {
175
- // E6 reception requires version 11833 or greater
176
- int um980Version = String (um980->getVersion ()).toInt (); // Convert the string response to a value
177
- if (um980Version >= 11833 )
178
- {
179
- if (um980->isConfigurationPresent (" CONFIG PPP ENABLE E6-HAS" ) == false )
180
- {
181
- if (um980->sendCommand (" CONFIG PPP ENABLE E6-HAS" ) == true )
182
- systemPrintln (" Galileo E6 service enabled" );
183
- else
184
- systemPrintln (" Galileo E6 service config error" );
185
-
186
- if (um980->sendCommand (" CONFIG PPP DATUM WGS84" ) == true )
187
- systemPrintln (" WGS84 Datum applied" );
188
- else
189
- systemPrintln (" WGS84 Datum error" );
190
- }
191
- }
192
- else
193
- {
194
- systemPrintf (
195
- " Current UM980 firmware: v%d. Galileo E6 reception requires v11833 or newer. Please update the "
196
- " firmware on your UM980 to allow for HAS operation. Please see https://bit.ly/sfe-rtk-um980-update\r\n " ,
197
- um980Version);
198
- }
199
- }
200
- else
201
- {
202
- // Turn off HAS/E6
203
- if (um980->isConfigurationPresent (" CONFIG PPP ENABLE E6-HAS" ) == true )
204
- {
205
- if (um980->sendCommand (" CONFIG PPP DISABLE" ) == true )
206
- {
207
- // systemPrintln("Galileo E6 service disabled");
208
- }
209
- else
210
- systemPrintln (" Galileo E6 service config error" );
211
- }
212
- }
213
-
214
173
if (response == true )
215
174
{
216
175
online.gnss = true ; // If we failed before, mark as online now
@@ -253,6 +212,10 @@ bool um980ConfigureRover()
253
212
254
213
response &= um980SetMinElevation (settings.minElev ); // UM980 default is 5 degrees. Our default is 10.
255
214
215
+ response &= um980SetMultipathMitigation (settings.enableMultipathMitigation );
216
+
217
+ response &= um980SetHighAccuracyService (settings.enableGalileoHas );
218
+
256
219
// Configure UM980 to output binary reports out COM2, connected to IM19 COM3
257
220
response &= um980->sendCommand (" BESTPOSB COM2 0.2" ); // 5Hz
258
221
response &= um980->sendCommand (" PSRVELB COM2 0.2" );
@@ -308,6 +271,10 @@ bool um980ConfigureBase()
308
271
// um980BaseAverageStart().
309
272
response &= um980SetModel (settings.dynamicModel );
310
273
274
+ response &= um980SetMultipathMitigation (settings.enableMultipathMitigation );
275
+
276
+ response &= um980SetHighAccuracyService (settings.enableGalileoHas );
277
+
311
278
response &= um980EnableRTCMBase (); // Only turn on messages, do not turn off messages. We assume the caller has
312
279
// UNLOG or similar.
313
280
@@ -586,6 +553,97 @@ bool um980SetModel(uint8_t modelNumber)
586
553
return (false );
587
554
}
588
555
556
+ bool um980SetMultipathMitigation (bool enableMultipathMitigation)
557
+ {
558
+ bool result = true ;
559
+
560
+ // Enable MMP as required
561
+ if (enableMultipathMitigation == true )
562
+ {
563
+ if (um980->isConfigurationPresent (" CONFIG MMP ENABLE" ) == false )
564
+ {
565
+ if (um980->sendCommand (" CONFIG MMP ENABLE" ) == true )
566
+ systemPrintln (" Multipath Mitigation enabled" );
567
+ else
568
+ {
569
+ systemPrintln (" Multipath Mitigation failed to enable" );
570
+ result = false ;
571
+ }
572
+ }
573
+ }
574
+ else
575
+ {
576
+ // Turn off MMP
577
+ if (um980->isConfigurationPresent (" CONFIG MMP ENABLE" ) == true )
578
+ {
579
+ if (um980->sendCommand (" CONFIG MMP DISABLE" ) == true )
580
+ systemPrintln (" Multipath Mitigation disabled" );
581
+ else
582
+ {
583
+ systemPrintln (" Multipath Mitigation failed to disable" );
584
+ result = false ;
585
+ }
586
+ }
587
+ }
588
+ return (result);
589
+ }
590
+
591
+ bool um980SetHighAccuracyService (bool enableGalileoHas)
592
+ {
593
+ bool result = true ;
594
+
595
+ // Enable E6 and PPP if enabled and possible
596
+ if (settings.enableGalileoHas == true )
597
+ {
598
+ // E6 reception requires version 11833 or greater
599
+ int um980Version = String (um980->getVersion ()).toInt (); // Convert the string response to a value
600
+ if (um980Version >= 11833 )
601
+ {
602
+ if (um980->isConfigurationPresent (" CONFIG PPP ENABLE E6-HAS" ) == false )
603
+ {
604
+ if (um980->sendCommand (" CONFIG PPP ENABLE E6-HAS" ) == true )
605
+ systemPrintln (" Galileo E6 service enabled" );
606
+ else
607
+ {
608
+ systemPrintln (" Galileo E6 service failed to enable" );
609
+ result = false ;
610
+ }
611
+
612
+ if (um980->sendCommand (" CONFIG PPP DATUM WGS84" ) == true )
613
+ systemPrintln (" WGS84 Datum applied" );
614
+ else
615
+ {
616
+ systemPrintln (" WGS84 Datum failed to apply" );
617
+ result = false ;
618
+ }
619
+ }
620
+ }
621
+ else
622
+ {
623
+ systemPrintf (
624
+ " Current UM980 firmware: v%d. Galileo E6 reception requires v11833 or newer. Please update the "
625
+ " firmware on your UM980 to allow for HAS operation. Please see https://bit.ly/sfe-rtk-um980-update\r\n " ,
626
+ um980Version);
627
+ // Don't fail the result. Module is still configured, just without HAS.
628
+ }
629
+ }
630
+ else
631
+ {
632
+ // Turn off HAS/E6
633
+ if (um980->isConfigurationPresent (" CONFIG PPP ENABLE E6-HAS" ) == true )
634
+ {
635
+ if (um980->sendCommand (" CONFIG PPP DISABLE" ) == true )
636
+ systemPrintln (" Galileo E6 service disabled" );
637
+ else
638
+ {
639
+ systemPrintln (" Galileo E6 service failed to disable" );
640
+ result = false ;
641
+ }
642
+ }
643
+ }
644
+ return (result);
645
+ }
646
+
589
647
void um980FactoryReset ()
590
648
{
591
649
um980->factoryReset ();
0 commit comments