Updating examples: change class name & update header file

This commit is contained in:
PaulZC
2021-01-09 08:18:31 +00:00
parent 2d0307f3b3
commit 627fc27700
62 changed files with 856 additions and 856 deletions
@@ -25,7 +25,7 @@
#include <Wire.h> //Needed for I2C to GNSS
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GPS myGPS;
SFE_UBLOX_GNSS myGNSS;
void setup()
{
@@ -36,36 +36,36 @@ void setup()
Wire.begin();
//myGPS.enableDebugging(); // Uncomment this line to enable debug messages
//myGNSS.enableDebugging(); // Uncomment this line to enable debug messages
if (myGPS.begin() == false) //Connect to the u-blox module using Wire port
if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
{
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
while (1)
;
}
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
boolean success = true;
//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so...
//Units are cm so 1234 = 12.34m
//success &= myGPS.setStaticPosition(-128020831, -471680385, 408666581);
//success &= myGNSS.setStaticPosition(-128020831, -471680385, 408666581);
//Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78)
success &= myGPS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10); //With high precision 0.1mm parts
success &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10); //With high precision 0.1mm parts
//We can also set via lat/long
//40.09029751,-105.18507900,1560.238
//success &= myGPS.setStaticPosition(400902975, -1051850790, 156024, true); //True at end enables lat/long input
//success &= myGPS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true);
//success &= myGNSS.setStaticPosition(400902975, -1051850790, 156024, true); //True at end enables lat/long input
//success &= myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true);
if (!success) Serial.println(F("At least one call to setStaticPosition failed!"));
//Now let's use getVals to read back the data
//long ecefX = myGPS.getVal32(0x40030003);
//long ecefX = myGNSS.getVal32(0x40030003);
//Serial.print("ecefX: ");
//Serial.println(ecefX);