@@ -405,14 +405,14 @@ void SFE_UBLOX_GPS::processRTCM(uint8_t incoming)
405
405
{
406
406
// Radio.sendReliable((String)incoming); //An example of passing this byte to a radio
407
407
408
- // Serial. write(incoming); //An example of passing this byte out the serial port
408
+ // _debugSerial-> write(incoming); //An example of passing this byte out the serial port
409
409
410
410
// Debug printing
411
- // Serial. print(" ");
412
- // if(incoming < 0x10) Serial. print("0");
413
- // if(incoming < 0x10) Serial. print("0");
414
- // Serial. print(incoming, HEX);
415
- // if(rtcmFrameCounter % 16 == 0) Serial. println();
411
+ // _debugSerial-> print(" ");
412
+ // if(incoming < 0x10) _debugSerial-> print("0");
413
+ // if(incoming < 0x10) _debugSerial-> print("0");
414
+ // _debugSerial-> print(incoming, HEX);
415
+ // if(rtcmFrameCounter % 16 == 0) _debugSerial-> println();
416
416
}
417
417
418
418
// Given a character, file it away into the uxb packet structure
@@ -552,7 +552,8 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
552
552
moduleQueried.headingOfMotion = true ;
553
553
moduleQueried.pDOP = true ;
554
554
}
555
- else if (msg->id == UBX_NAV_HPPOSLLH && msg->len == 36 ){
555
+ else if (msg->id == UBX_NAV_HPPOSLLH && msg->len == 36 )
556
+ {
556
557
timeOfWeek = extractLong (4 );
557
558
highResLatitude = extractLong (8 );
558
559
highResLongitude = extractLong (12 );
@@ -561,7 +562,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
561
562
geoidSeparation = extractLong (24 );
562
563
horizontalAccuracy = extractLong (28 );
563
564
verticalAccuracy = extractLong (32 );
564
-
565
+
565
566
highResModuleQueried.all = true ;
566
567
highResModuleQueried.timeOfWeek = true ;
567
568
highResModuleQueried.highResLatitude = true ;
@@ -574,14 +575,30 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
574
575
575
576
if (_printDebug == true )
576
577
{
577
- Serial.print (" Sec: " ); Serial.print (((float )extractLong (4 )) / 1000 .0f ); Serial.print (" " );
578
- Serial.print (" LON: " ); Serial.print (((float )(int32_t )extractLong (8 )) / 10000000 .0f ); Serial.print (" " );
579
- Serial.print (" LAT: " ); Serial.print (((float )(int32_t )extractLong (12 )) / 10000000 .0f ); Serial.print (" " );
580
- Serial.print (" ELI M: " ); Serial.print (((float )(int32_t )extractLong (16 )) / 1000 .0f ); Serial.print (" " );
581
- Serial.print (" MSL M: " ); Serial.print (((float )(int32_t )extractLong (20 )) / 1000 .0f ); Serial.print (" " );
582
- Serial.print (" GEO: " ); Serial.print (((float )(int32_t )extractLong (24 ))/ 1000 .0f ); Serial.print (" " );
583
- Serial.print (" HA 2D M: " ); Serial.print (((float )extractLong (28 )) / 1000 .0f ); Serial.print (" " );
584
- Serial.print (" VERT M: " ); Serial.print (((float )extractLong (32 )) / 1000 .0f ); Serial.print (" " );
578
+ _debugSerial->print (" Sec: " );
579
+ _debugSerial->print (((float )extractLong (4 )) / 1000 .0f );
580
+ _debugSerial->print (" " );
581
+ _debugSerial->print (" LON: " );
582
+ _debugSerial->print (((float )(int32_t )extractLong (8 )) / 10000000 .0f );
583
+ _debugSerial->print (" " );
584
+ _debugSerial->print (" LAT: " );
585
+ _debugSerial->print (((float )(int32_t )extractLong (12 )) / 10000000 .0f );
586
+ _debugSerial->print (" " );
587
+ _debugSerial->print (" ELI M: " );
588
+ _debugSerial->print (((float )(int32_t )extractLong (16 )) / 1000 .0f );
589
+ _debugSerial->print (" " );
590
+ _debugSerial->print (" MSL M: " );
591
+ _debugSerial->print (((float )(int32_t )extractLong (20 )) / 1000 .0f );
592
+ _debugSerial->print (" " );
593
+ _debugSerial->print (" GEO: " );
594
+ _debugSerial->print (((float )(int32_t )extractLong (24 )) / 1000 .0f );
595
+ _debugSerial->print (" " );
596
+ _debugSerial->print (" HA 2D M: " );
597
+ _debugSerial->print (((float )extractLong (28 )) / 1000 .0f );
598
+ _debugSerial->print (" " );
599
+ _debugSerial->print (" VERT M: " );
600
+ _debugSerial->print (((float )extractLong (32 )) / 1000 .0f );
601
+ _debugSerial->print (" " );
585
602
}
586
603
}
587
604
break ;
@@ -1339,56 +1356,64 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
1339
1356
}
1340
1357
}
1341
1358
1342
- uint32_t SFE_UBLOX_GPS::getTimeOfWeek (uint16_t maxWait/* = 250*/ ){
1359
+ uint32_t SFE_UBLOX_GPS::getTimeOfWeek (uint16_t maxWait /* = 250*/ )
1360
+ {
1343
1361
if (highResModuleQueried.timeOfWeek == false )
1344
1362
getHPPOSLLH ();
1345
1363
highResModuleQueried.timeOfWeek = false ; // Since we are about to give this to user, mark this data as stale
1346
1364
return (timeOfWeek);
1347
1365
}
1348
1366
1349
- int32_t SFE_UBLOX_GPS::getHighResLatitude (uint16_t maxWait/* = 250*/ ){
1367
+ int32_t SFE_UBLOX_GPS::getHighResLatitude (uint16_t maxWait /* = 250*/ )
1368
+ {
1350
1369
if (highResModuleQueried.highResLatitude == false )
1351
1370
getHPPOSLLH ();
1352
1371
highResModuleQueried.highResLatitude = false ; // Since we are about to give this to user, mark this data as stale
1353
1372
return (highResLatitude);
1354
1373
}
1355
1374
1356
- int32_t SFE_UBLOX_GPS::getHighResLongitude (uint16_t maxWait/* = 250*/ ){
1375
+ int32_t SFE_UBLOX_GPS::getHighResLongitude (uint16_t maxWait /* = 250*/ )
1376
+ {
1357
1377
if (highResModuleQueried.highResLongitude == false )
1358
1378
getHPPOSLLH ();
1359
1379
highResModuleQueried.highResLongitude = false ; // Since we are about to give this to user, mark this data as stale
1360
1380
return (highResLongitude);
1361
1381
}
1362
1382
1363
- int32_t SFE_UBLOX_GPS::getElipsoid (uint16_t maxWait/* = 250*/ ){
1383
+ int32_t SFE_UBLOX_GPS::getElipsoid (uint16_t maxWait /* = 250*/ )
1384
+ {
1364
1385
if (highResModuleQueried.elipsoid == false )
1365
1386
getHPPOSLLH ();
1366
1387
highResModuleQueried.elipsoid = false ; // Since we are about to give this to user, mark this data as stale
1367
1388
return (elipsoid);
1368
1389
}
1369
1390
1370
- int32_t SFE_UBLOX_GPS::getMeanSeaLevel (uint16_t maxWait/* = 250*/ ){
1391
+ int32_t SFE_UBLOX_GPS::getMeanSeaLevel (uint16_t maxWait /* = 250*/ )
1392
+ {
1371
1393
if (highResModuleQueried.meanSeaLevel == false )
1372
1394
getHPPOSLLH ();
1373
1395
highResModuleQueried.meanSeaLevel = false ; // Since we are about to give this to user, mark this data as stale
1374
1396
return (meanSeaLevel);
1375
1397
}
1376
1398
1377
- int32_t SFE_UBLOX_GPS::getGeoidSeparation (uint16_t maxWait/* = 250*/ ){
1399
+ int32_t SFE_UBLOX_GPS::getGeoidSeparation (uint16_t maxWait /* = 250*/ )
1400
+ {
1378
1401
if (highResModuleQueried.geoidSeparation == false )
1379
1402
getHPPOSLLH ();
1380
1403
highResModuleQueried.geoidSeparation = false ; // Since we are about to give this to user, mark this data as stale
1381
1404
return (geoidSeparation);
1382
1405
}
1383
1406
1384
- uint32_t SFE_UBLOX_GPS::getHorizontalAccuracy (uint16_t maxWait/* = 250*/ ){
1407
+ uint32_t SFE_UBLOX_GPS::getHorizontalAccuracy (uint16_t maxWait /* = 250*/ )
1408
+ {
1385
1409
if (highResModuleQueried.horizontalAccuracy == false )
1386
1410
getHPPOSLLH ();
1387
1411
highResModuleQueried.horizontalAccuracy = false ; // Since we are about to give this to user, mark this data as stale
1388
1412
return (horizontalAccuracy);
1389
1413
}
1390
1414
1391
- uint32_t SFE_UBLOX_GPS::getVerticalAccuracy (uint16_t maxWait/* = 250*/ ){
1415
+ uint32_t SFE_UBLOX_GPS::getVerticalAccuracy (uint16_t maxWait /* = 250*/ )
1416
+ {
1392
1417
if (highResModuleQueried.verticalAccuracy == false )
1393
1418
getHPPOSLLH ();
1394
1419
highResModuleQueried.verticalAccuracy = false ; // Since we are about to give this to user, mark this data as stale
@@ -1397,16 +1422,15 @@ uint32_t SFE_UBLOX_GPS::getVerticalAccuracy(uint16_t maxWait/* = 250*/){
1397
1422
1398
1423
boolean SFE_UBLOX_GPS::getHPPOSLLH (uint16_t maxWait)
1399
1424
{
1400
- // The GPS is not automatically reporting navigation position so we have to poll explicitly
1401
- packetCfg.cls = UBX_CLASS_NAV;
1402
- packetCfg.id = UBX_NAV_HPPOSLLH;
1403
- packetCfg.len = 0 ;
1425
+ // The GPS is not automatically reporting navigation position so we have to poll explicitly
1426
+ packetCfg.cls = UBX_CLASS_NAV;
1427
+ packetCfg.id = UBX_NAV_HPPOSLLH;
1428
+ packetCfg.len = 0 ;
1404
1429
1405
- return sendCommand (packetCfg, maxWait);
1406
- return (false ); // If command send fails then bail
1430
+ return sendCommand (packetCfg, maxWait);
1431
+ return (false ); // If command send fails then bail
1407
1432
}
1408
1433
1409
-
1410
1434
// Get the current 3D high precision positional accuracy - a fun thing to watch
1411
1435
// Returns a long representing the 3D accuracy in millimeters
1412
1436
uint32_t SFE_UBLOX_GPS::getPositionAccuracy (uint16_t maxWait)
@@ -1624,8 +1648,8 @@ boolean SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait)
1624
1648
// We got a response, now parse the bits
1625
1649
1626
1650
uint16_t refStationID = extractInt (2 );
1627
- Serial. print (" refStationID: " );
1628
- Serial. println (refStationID);
1651
+ // _debugSerial-> print("refStationID: ");
1652
+ // _debugSerial-> println(refStationID);
1629
1653
1630
1654
int32_t tempRelPos;
1631
1655
0 commit comments