Merge pull request #111 from sparkfun/release_candidate

v2.2.1
This commit is contained in:
Paul
2022-02-20 18:34:53 +00:00
committed by GitHub
32 changed files with 9137 additions and 6046 deletions
+6 -4
View File
@@ -129,21 +129,23 @@ See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Libra
See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/b746d8e2742961ede95e2d06d5db3a3a557e571d) for the changes. See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/b746d8e2742961ede95e2d06d5db3a3a557e571d) for the changes.
#### Step 6.3: Update processUBXpacket() #### Step 6.3: Update getMaxPayloadSize()
#### Step 6.4: Update processUBXpacket()
Take time to double-check that you have used the correct data width, signed/unsigned and position for each field. Take time to double-check that you have used the correct data width, signed/unsigned and position for each field.
See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/8eecdd5044f810b0e2b567150ff63a17c219fe8e) for the changes. See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/8eecdd5044f810b0e2b567150ff63a17c219fe8e) for the changes.
#### Step 6.4: Update checkCallbacks() #### Step 6.5: Update checkCallbacks()
See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/b53bffaa3ae12482cfb268f23796963d0b8519c9) for the changes. See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/b53bffaa3ae12482cfb268f23796963d0b8519c9) for the changes.
#### Step 6.5: Add the "auto" functions #### Step 6.6: Add the "auto" functions
See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/e394ae003ad38117d150598774d0552059416473) for the changes. See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/e394ae003ad38117d150598774d0552059416473) for the changes.
#### Step 6.6: Add the helper functions (if any) #### Step 6.7: Add the helper functions (if any)
See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/318e76383e96d6676bbb57294c25e665c0d4a31f) for the changes. See [this commit](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/commit/318e76383e96d6676bbb57294c25e665c0d4a31f) for the changes.
+6 -2
View File
@@ -21,9 +21,13 @@ u-blox makes some incredible GNSS receivers covering everything from low-cost, h
This library can be installed via the Arduino Library manager. Search for **SparkFun u-blox GNSS**. This library can be installed via the Arduino Library manager. Search for **SparkFun u-blox GNSS**.
## Automatic support for correction services like RTK2go, Emlid Caster and Skylark (Swift Navigation) ## Automatic support for correction services like PointPerfect (u-blox), RTK2go, Emlid Caster and Skylark (Swift Navigation)
RTK NTRIP corrections services often require you to send them your location in NMEA GPGGA format. v2.2 of the library makes this easy by providing get functions and automatic callbacks u-blox's PointPerfect GNSS augmentation service uses the secure MQTT protocol to download SPARTN format correction data, providing "3-6 cm accuracy and convergence within seconds". Please see the new [PointPerfect Client example](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/tree/main/examples/ZED-F9P/Example18_PointPerfectClient) for more details.
v2.3 also supports L-band correction services using the new u-blox NEO-D9S correction data receiver. Please see the new [L-band Corrections example](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/tree/main/examples/ZED-F9P/Example19_LBand_Corrections_with_NEO-D9S) for more details.
Other RTK NTRIP corrections services often require you to send them your location in NMEA GPGGA format. v2.2 of the library makes this easy by providing get functions and automatic callbacks
for both GPGGA and GNGGA messages. You can now instruct your module to output GPGGA (e.g.) every 10 seconds and then push it to the correction server directly from the callback. No more polling, no more parsing! for both GPGGA and GNGGA messages. You can now instruct your module to output GPGGA (e.g.) every 10 seconds and then push it to the correction server directly from the callback. No more polling, no more parsing!
v2.2 also includes two new functions useful for correction services: v2.2 also includes two new functions useful for correction services:
@@ -42,22 +42,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct) void printSATdata(UBX_NAV_SAT_data_t *ubxDataStruct)
{ {
//Serial.println(); //Serial.println();
Serial.print(F("UBX-NAV-SAT contains data for ")); Serial.print(F("UBX-NAV-SAT contains data for "));
Serial.print(ubxDataStruct.header.numSvs); Serial.print(ubxDataStruct->header.numSvs);
if (ubxDataStruct.header.numSvs == 1) if (ubxDataStruct->header.numSvs == 1)
Serial.println(F(" SV")); Serial.println(F(" SV"));
else else
Serial.println(F(" SVs")); Serial.println(F(" SVs"));
uint16_t numAopAvail = 0; // Count how many SVs have AssistNow Autonomous data available uint16_t numAopAvail = 0; // Count how many SVs have AssistNow Autonomous data available
for (uint16_t block = 0; block < ubxDataStruct.header.numSvs; block++) // For each SV for (uint16_t block = 0; block < ubxDataStruct->header.numSvs; block++) // For each SV
{ {
if (ubxDataStruct.blocks[block].flags.bits.aopAvail == 1) // If the aopAvail bit is set if (ubxDataStruct->blocks[block].flags.bits.aopAvail == 1) // If the aopAvail bit is set
numAopAvail++; // Increment the number of SVs numAopAvail++; // Increment the number of SVs
} }
@@ -78,12 +78,12 @@ void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printAOPstatus(UBX_NAV_AOPSTATUS_data_t ubxDataStruct) void printAOPstatus(UBX_NAV_AOPSTATUS_data_t *ubxDataStruct)
{ {
//Serial.println(); //Serial.println();
Serial.print(F("AOPSTATUS status is ")); Serial.print(F("AOPSTATUS status is "));
Serial.println(ubxDataStruct.status); Serial.println(ubxDataStruct->status);
} }
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -95,27 +95,27 @@ void printAOPstatus(UBX_NAV_AOPSTATUS_data_t ubxDataStruct)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct) void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{ {
// Print the UBX-NAV-PVT data so we can see how quickly the fixType goes to 3D // Print the UBX-NAV-PVT data so we can see how quickly the fixType goes to 3D
Serial.println(); Serial.println();
long latitude = ubxDataStruct.lat; // Print the latitude long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F("Lat: ")); Serial.print(F("Lat: "));
Serial.print(latitude); Serial.print(latitude);
long longitude = ubxDataStruct.lon; // Print the longitude long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: ")); Serial.print(F(" Long: "));
Serial.print(longitude); Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)")); Serial.print(F(" (degrees * 10^-7)"));
long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level long altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Alt: ")); Serial.print(F(" Alt: "));
Serial.print(altitude); Serial.print(altitude);
Serial.print(F(" (mm)")); Serial.print(F(" (mm)"));
byte fixType = ubxDataStruct.fixType; // Print the fix type byte fixType = ubxDataStruct->fixType; // Print the fix type
Serial.print(F(" Fix: ")); Serial.print(F(" Fix: "));
if(fixType == 0) Serial.print(F("No fix")); if(fixType == 0) Serial.print(F("No fix"));
else if(fixType == 1) Serial.print(F("Dead reckoning")); else if(fixType == 1) Serial.print(F("Dead reckoning"));
@@ -171,9 +171,9 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one solution per second myGNSS.setNavigationFrequency(1); //Produce one solution per second
myGNSS.setAutoNAVSATcallback(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata myGNSS.setAutoNAVSATcallbackPtr(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallback(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus myGNSS.setAutoAOPSTATUScallbackPtr(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
} }
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -35,22 +35,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct) void printSATdata(UBX_NAV_SAT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("UBX-NAV-SAT contains data for ")); Serial.print(F("UBX-NAV-SAT contains data for "));
Serial.print(ubxDataStruct.header.numSvs); Serial.print(ubxDataStruct->header.numSvs);
if (ubxDataStruct.header.numSvs == 1) if (ubxDataStruct->header.numSvs == 1)
Serial.println(F(" SV")); Serial.println(F(" SV"));
else else
Serial.println(F(" SVs")); Serial.println(F(" SVs"));
uint16_t numAopAvail = 0; // Count how many SVs have AssistNow Autonomous data available uint16_t numAopAvail = 0; // Count how many SVs have AssistNow Autonomous data available
for (uint16_t block = 0; block < ubxDataStruct.header.numSvs; block++) // For each SV for (uint16_t block = 0; block < ubxDataStruct->header.numSvs; block++) // For each SV
{ {
if (ubxDataStruct.blocks[block].flags.bits.aopAvail == 1) // If the aopAvail bit is set if (ubxDataStruct->blocks[block].flags.bits.aopAvail == 1) // If the aopAvail bit is set
numAopAvail++; // Increment the number of SVs numAopAvail++; // Increment the number of SVs
} }
@@ -71,12 +71,12 @@ void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printAOPstatus(UBX_NAV_AOPSTATUS_data_t ubxDataStruct) void printAOPstatus(UBX_NAV_AOPSTATUS_data_t *ubxDataStruct)
{ {
//Serial.println(); //Serial.println();
Serial.print(F("AOPSTATUS status is ")); Serial.print(F("AOPSTATUS status is "));
Serial.println(ubxDataStruct.status); Serial.println(ubxDataStruct->status);
} }
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -126,8 +126,8 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one solution per second myGNSS.setNavigationFrequency(1); //Produce one solution per second
myGNSS.setAutoNAVSATcallback(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata myGNSS.setAutoNAVSATcallbackPtr(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallback(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus myGNSS.setAutoAOPSTATUScallbackPtr(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Keep displaying NAV SAT and AOPSTATUS until the user presses a key // Keep displaying NAV SAT and AOPSTATUS until the user presses a key
@@ -39,12 +39,12 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printGPGGA(NMEA_GGA_data_t nmeaData) void printGPGGA(NMEA_GGA_data_t *nmeaData)
{ {
Serial.print(F("\r\nGPGGA: Length: ")); Serial.print(F("\r\nGPGGA: Length: "));
Serial.print(nmeaData.length); Serial.print(nmeaData->length);
Serial.print(F("\tData: ")); Serial.print(F("\tData: "));
Serial.print((const char *)nmeaData.nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end Serial.print((const char *)nmeaData->nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end
} }
// Callback: printGNGGA will be called if new GNGGA NMEA data arrives // Callback: printGNGGA will be called if new GNGGA NMEA data arrives
@@ -54,12 +54,12 @@ void printGPGGA(NMEA_GGA_data_t nmeaData)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printGNGGA(NMEA_GGA_data_t nmeaData) void printGNGGA(NMEA_GGA_data_t *nmeaData)
{ {
Serial.print(F("\r\nGNGGA: Length: ")); Serial.print(F("\r\nGNGGA: Length: "));
Serial.print(nmeaData.length); Serial.print(nmeaData->length);
Serial.print(F("\tData: ")); Serial.print(F("\tData: "));
Serial.print((const char *)nmeaData.nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end Serial.print((const char *)nmeaData->nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end
} }
void setup() void setup()
@@ -101,10 +101,10 @@ void setup()
//myGNSS.setNMEAOutputPort(Serial); // Uncomment this line to echo all NMEA data to Serial for debugging //myGNSS.setNMEAOutputPort(Serial); // Uncomment this line to echo all NMEA data to Serial for debugging
// Set up the callback for GPGGA // Set up the callback for GPGGA
myGNSS.setNMEAGPGGAcallback(&printGPGGA); myGNSS.setNMEAGPGGAcallbackPtr(&printGPGGA);
// Set up the callback for GNGGA // Set up the callback for GNGGA
myGNSS.setNMEAGNGGAcallback(&printGNGGA); myGNSS.setNMEAGNGGAcallbackPtr(&printGNGGA);
} }
void loop() void loop()
@@ -33,38 +33,38 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct) void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("Time: ")); // Print the time Serial.print(F("Time: ")); // Print the time
uint8_t hms = ubxDataStruct.hour; // Print the hours uint8_t hms = ubxDataStruct->hour; // Print the hours
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.min; // Print the minutes hms = ubxDataStruct->min; // Print the minutes
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.sec; // Print the seconds hms = ubxDataStruct->sec; // Print the seconds
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(".")); Serial.print(F("."));
unsigned long millisecs = ubxDataStruct.iTOW % 1000; // Print the milliseconds unsigned long millisecs = ubxDataStruct->iTOW % 1000; // Print the milliseconds
if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly
if (millisecs < 10) Serial.print(F("0")); if (millisecs < 10) Serial.print(F("0"));
Serial.print(millisecs); Serial.print(millisecs);
long latitude = ubxDataStruct.lat; // Print the latitude long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F(" Lat: ")); Serial.print(F(" Lat: "));
Serial.print(latitude); Serial.print(latitude);
long longitude = ubxDataStruct.lon; // Print the longitude long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: ")); Serial.print(F(" Long: "));
Serial.print(longitude); Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)")); Serial.print(F(" (degrees * 10^-7)"));
long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level long altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Height above MSL: ")); Serial.print(F(" Height above MSL: "));
Serial.print(altitude); Serial.print(altitude);
Serial.println(F(" (mm)")); Serial.println(F(" (mm)"));
@@ -91,7 +91,7 @@ void setup()
myGNSS.setNavigationFrequency(2); //Produce two solutions per second myGNSS.setNavigationFrequency(2); //Produce two solutions per second
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
} }
void loop() void loop()
@@ -33,22 +33,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printODOdata(UBX_NAV_ODO_data_t ubxDataStruct) void printODOdata(UBX_NAV_ODO_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("TOW: ")); // Print the Time Of Week Serial.print(F("TOW: ")); // Print the Time Of Week
unsigned long iTOW = ubxDataStruct.iTOW; // iTOW is in milliseconds unsigned long iTOW = ubxDataStruct->iTOW; // iTOW is in milliseconds
Serial.print(iTOW); Serial.print(iTOW);
Serial.print(F(" (ms)")); Serial.print(F(" (ms)"));
Serial.print(F(" Distance: ")); Serial.print(F(" Distance: "));
unsigned long distance = ubxDataStruct.distance; // Print the distance unsigned long distance = ubxDataStruct->distance; // Print the distance
Serial.print(distance); Serial.print(distance);
Serial.print(F(" (m)")); Serial.print(F(" (m)"));
Serial.print(F(" Total Distance: ")); Serial.print(F(" Total Distance: "));
unsigned long totalDistance = ubxDataStruct.totalDistance; // Print the total distance unsigned long totalDistance = ubxDataStruct->totalDistance; // Print the total distance
Serial.print(totalDistance); Serial.print(totalDistance);
Serial.println(F(" (m)")); Serial.println(F(" (m)"));
} }
@@ -76,7 +76,7 @@ void setup()
//myGNSS.resetOdometer(); //Uncomment this line to reset the odometer //myGNSS.resetOdometer(); //Uncomment this line to reset the odometer
myGNSS.setAutoNAVODOcallback(&printODOdata); // Enable automatic NAV ODO messages with callback to printODOdata myGNSS.setAutoNAVODOcallbackPtr(&printODOdata); // Enable automatic NAV ODO messages with callback to printODOdata
} }
void loop() void loop()
@@ -48,30 +48,30 @@ int dotsPrinted = 0; // Print dots in rows of 50 while waiting for a TIM TM2 mes
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printTIMTM2data(UBX_TIM_TM2_data_t ubxDataStruct) void printTIMTM2data(UBX_TIM_TM2_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("newFallingEdge: ")); // 1 if a new falling edge was detected Serial.print(F("newFallingEdge: ")); // 1 if a new falling edge was detected
Serial.print(ubxDataStruct.flags.bits.newFallingEdge); Serial.print(ubxDataStruct->flags.bits.newFallingEdge);
Serial.print(F(" newRisingEdge: ")); // 1 if a new rising edge was detected Serial.print(F(" newRisingEdge: ")); // 1 if a new rising edge was detected
Serial.print(ubxDataStruct.flags.bits.newRisingEdge); Serial.print(ubxDataStruct->flags.bits.newRisingEdge);
Serial.print(F(" Rising Edge Counter: ")); // Rising edge counter Serial.print(F(" Rising Edge Counter: ")); // Rising edge counter
Serial.print(ubxDataStruct.count); Serial.print(ubxDataStruct->count);
Serial.print(F(" towMsR: ")); // Time Of Week of rising edge (ms) Serial.print(F(" towMsR: ")); // Time Of Week of rising edge (ms)
Serial.print(ubxDataStruct.towMsR); Serial.print(ubxDataStruct->towMsR);
Serial.print(F(" towSubMsR: ")); // Millisecond fraction of Time Of Week of rising edge in nanoseconds Serial.print(F(" towSubMsR: ")); // Millisecond fraction of Time Of Week of rising edge in nanoseconds
Serial.print(ubxDataStruct.towSubMsR); Serial.print(ubxDataStruct->towSubMsR);
Serial.print(F(" towMsF: ")); // Time Of Week of falling edge (ms) Serial.print(F(" towMsF: ")); // Time Of Week of falling edge (ms)
Serial.print(ubxDataStruct.towMsF); Serial.print(ubxDataStruct->towMsF);
Serial.print(F(" towSubMsF: ")); // Millisecond fraction of Time Of Week of falling edge in nanoseconds Serial.print(F(" towSubMsF: ")); // Millisecond fraction of Time Of Week of falling edge in nanoseconds
Serial.println(ubxDataStruct.towSubMsF); Serial.println(ubxDataStruct->towSubMsF);
dotsPrinted = 0; // Reset dotsPrinted dotsPrinted = 0; // Reset dotsPrinted
} }
@@ -97,7 +97,7 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one solution per second myGNSS.setNavigationFrequency(1); //Produce one solution per second
myGNSS.setAutoTIMTM2callback(&printTIMTM2data); // Enable automatic TIM TM2 messages with callback to printTIMTM2data myGNSS.setAutoTIMTM2callbackPtr(&printTIMTM2data); // Enable automatic TIM TM2 messages with callback to printTIMTM2data
} }
void loop() void loop()
@@ -38,39 +38,39 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printHNRATTdata(UBX_HNR_ATT_data_t ubxDataStruct) void printHNRATTdata(UBX_HNR_ATT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("Roll: ")); // Print selected data Serial.print(F("Roll: ")); // Print selected data
Serial.print((float)ubxDataStruct.roll / 100000.0, 2); // Convert roll to degrees Serial.print((float)ubxDataStruct->roll / 100000.0, 2); // Convert roll to degrees
Serial.print(F(" Pitch: ")); Serial.print(F(" Pitch: "));
Serial.print((float)ubxDataStruct.pitch / 100000.0, 2); // Convert pitch to degrees Serial.print((float)ubxDataStruct->pitch / 100000.0, 2); // Convert pitch to degrees
Serial.print(F(" Heading: ")); Serial.print(F(" Heading: "));
Serial.println((float)ubxDataStruct.heading / 100000.0, 2); // Convert heading to degrees Serial.println((float)ubxDataStruct->heading / 100000.0, 2); // Convert heading to degrees
} }
// Callback: printHNRINSdata will be called when new HNR INS data arrives // Callback: printHNRINSdata will be called when new HNR INS data arrives
// See u-blox_structs.h for the full definition of UBX_HNR_INS_data_t // See u-blox_structs.h for the full definition of UBX_HNR_INS_data_t
void printHNRINSdata(UBX_HNR_INS_data_t ubxDataStruct) void printHNRINSdata(UBX_HNR_INS_data_t *ubxDataStruct)
{ {
Serial.print(F("xAccel: ")); // Print selected data Serial.print(F("xAccel: ")); // Print selected data
Serial.print(ubxDataStruct.xAccel); Serial.print(ubxDataStruct->xAccel);
Serial.print(F(" yAccel: ")); Serial.print(F(" yAccel: "));
Serial.print(ubxDataStruct.yAccel); Serial.print(ubxDataStruct->yAccel);
Serial.print(F(" zAccel: ")); Serial.print(F(" zAccel: "));
Serial.println(ubxDataStruct.zAccel); Serial.println(ubxDataStruct->zAccel);
} }
// Callback: printHNRPVTdata will be called when new HNR PVT data arrives // Callback: printHNRPVTdata will be called when new HNR PVT data arrives
// See u-blox_structs.h for the full definition of UBX_HNR_PVT_data_t // See u-blox_structs.h for the full definition of UBX_HNR_PVT_data_t
void printHNRPVTdata(UBX_HNR_PVT_data_t ubxDataStruct) void printHNRPVTdata(UBX_HNR_PVT_data_t *ubxDataStruct)
{ {
Serial.print(F("ns: ")); // Print selected data Serial.print(F("ns: ")); // Print selected data
Serial.print(ubxDataStruct.nano); Serial.print(ubxDataStruct->nano);
Serial.print(F(" Lat: ")); Serial.print(F(" Lat: "));
Serial.print(ubxDataStruct.lat); Serial.print(ubxDataStruct->lat);
Serial.print(F(" Lon: ")); Serial.print(F(" Lon: "));
Serial.println(ubxDataStruct.lon); Serial.println(ubxDataStruct->lon);
} }
void setup() void setup()
@@ -97,13 +97,13 @@ void setup()
else else
Serial.println(F("setHNRNavigationRate was NOT successful")); Serial.println(F("setHNRNavigationRate was NOT successful"));
if (myGNSS.setAutoHNRATTcallback(&printHNRATTdata) == true) // Enable automatic HNR ATT messages with callback to printHNRATTdata if (myGNSS.setAutoHNRATTcallbackPtr(&printHNRATTdata) == true) // Enable automatic HNR ATT messages with callback to printHNRATTdata
Serial.println(F("setAutoHNRATTcallback successful")); Serial.println(F("setAutoHNRATTcallback successful"));
if (myGNSS.setAutoHNRINScallback(&printHNRINSdata) == true) // Enable automatic HNR INS messages with callback to printHNRINSdata if (myGNSS.setAutoHNRINScallbackPtr(&printHNRINSdata) == true) // Enable automatic HNR INS messages with callback to printHNRINSdata
Serial.println(F("setAutoHNRINScallback successful")); Serial.println(F("setAutoHNRINScallback successful"));
if (myGNSS.setAutoHNRPVTcallback(&printHNRPVTdata) == true) // Enable automatic HNR PVT messages with callback to printHNRPVTdata if (myGNSS.setAutoHNRPVTcallbackPtr(&printHNRPVTdata) == true) // Enable automatic HNR PVT messages with callback to printHNRPVTdata
Serial.println(F("setAutoHNRPVTcallback successful")); Serial.println(F("setAutoHNRPVTcallback successful"));
} }
@@ -35,39 +35,39 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printESFALGdata(UBX_ESF_ALG_data_t ubxDataStruct) void printESFALGdata(UBX_ESF_ALG_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("TOW: ")); // Print the Time Of Week Serial.print(F("TOW: ")); // Print the Time Of Week
unsigned long iTOW = ubxDataStruct.iTOW; // iTOW is in milliseconds unsigned long iTOW = ubxDataStruct->iTOW; // iTOW is in milliseconds
Serial.print(iTOW); Serial.print(iTOW);
Serial.print(F(" (ms)")); Serial.print(F(" (ms)"));
Serial.print(F(" Roll: ")); // Print selected data Serial.print(F(" Roll: ")); // Print selected data
Serial.print((float)ubxDataStruct.roll / 100.0, 2); // Convert roll to degrees Serial.print((float)ubxDataStruct->roll / 100.0, 2); // Convert roll to degrees
Serial.print(F(" Pitch: ")); Serial.print(F(" Pitch: "));
Serial.print((float)ubxDataStruct.pitch / 100.0, 2); // Convert pitch to degrees Serial.print((float)ubxDataStruct->pitch / 100.0, 2); // Convert pitch to degrees
Serial.print(F(" Yaw: ")); Serial.print(F(" Yaw: "));
Serial.print((float)ubxDataStruct.yaw / 100.0, 2); // Convert yaw to degrees Serial.print((float)ubxDataStruct->yaw / 100.0, 2); // Convert yaw to degrees
Serial.println(F(" (Degrees)")); Serial.println(F(" (Degrees)"));
} }
// Callback: printESFINSdata will be called when new ESF INS data arrives // Callback: printESFINSdata will be called when new ESF INS data arrives
// See u-blox_structs.h for the full definition of UBX_ESF_INS_data_t // See u-blox_structs.h for the full definition of UBX_ESF_INS_data_t
void printESFINSdata(UBX_ESF_INS_data_t ubxDataStruct) void printESFINSdata(UBX_ESF_INS_data_t *ubxDataStruct)
{ {
Serial.print(F("xAccel: ")); // Print selected data Serial.print(F("xAccel: ")); // Print selected data
Serial.print(ubxDataStruct.xAccel); Serial.print(ubxDataStruct->xAccel);
Serial.print(F(" yAccel: ")); Serial.print(F(" yAccel: "));
Serial.print(ubxDataStruct.yAccel); Serial.print(ubxDataStruct->yAccel);
Serial.print(F(" zAccel: ")); Serial.print(F(" zAccel: "));
Serial.print(ubxDataStruct.zAccel); Serial.print(ubxDataStruct->zAccel);
Serial.println(F(" (m/s^2)")); Serial.println(F(" (m/s^2)"));
} }
@@ -75,23 +75,23 @@ void printESFINSdata(UBX_ESF_INS_data_t ubxDataStruct)
// Callback: printESFMEASdata will be called when new ESF MEAS data arrives // Callback: printESFMEASdata will be called when new ESF MEAS data arrives
// See u-blox_structs.h for the full definition of UBX_ESF_MEAS_data_t // See u-blox_structs.h for the full definition of UBX_ESF_MEAS_data_t
// and UBX_ESF_MEAS_sensorData_t // and UBX_ESF_MEAS_sensorData_t
void printESFMEASdata(UBX_ESF_MEAS_data_t ubxDataStruct) void printESFMEASdata(UBX_ESF_MEAS_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("id: ")); // Print selected data Serial.print(F("id: ")); // Print selected data
Serial.print(ubxDataStruct.id); Serial.print(ubxDataStruct->id);
Serial.print(F(" numMeas: ")); Serial.print(F(" numMeas: "));
Serial.println(ubxDataStruct.flags.bits.numMeas); Serial.println(ubxDataStruct->flags.bits.numMeas);
for (uint8_t num = 0; num < ubxDataStruct.flags.bits.numMeas; num++) // For each sensor for (uint8_t num = 0; num < ubxDataStruct->flags.bits.numMeas; num++) // For each sensor
{ {
Serial.print(F("Sensor ")); Serial.print(F("Sensor "));
Serial.print(num); Serial.print(num);
UBX_ESF_MEAS_sensorData_t sensorData; UBX_ESF_MEAS_sensorData_t sensorData;
myGNSS.getSensorFusionMeasurement(&sensorData, ubxDataStruct, num); // Extract the data for one sensor myGNSS.getSensorFusionMeasurement(&sensorData, *ubxDataStruct, num); // Extract the data for one sensor
Serial.print(F(": Type: ")); Serial.print(F(": Type: "));
Serial.print(sensorData.data.bits.dataType); Serial.print(sensorData.data.bits.dataType);
@@ -103,21 +103,21 @@ void printESFMEASdata(UBX_ESF_MEAS_data_t ubxDataStruct)
// Callback: printESFSTATUSdata will be called when new ESF STATUS data arrives // Callback: printESFSTATUSdata will be called when new ESF STATUS data arrives
// See u-blox_structs.h for the full definition of UBX_ESF_STATUS_data_t // See u-blox_structs.h for the full definition of UBX_ESF_STATUS_data_t
// and UBX_ESF_STATUS_sensorStatus_t // and UBX_ESF_STATUS_sensorStatus_t
void printESFSTATUSdata(UBX_ESF_STATUS_data_t ubxDataStruct) void printESFSTATUSdata(UBX_ESF_STATUS_data_t *ubxDataStruct)
{ {
Serial.print(F("fusionMode: ")); // Print selected data Serial.print(F("fusionMode: ")); // Print selected data
Serial.print(ubxDataStruct.fusionMode); Serial.print(ubxDataStruct->fusionMode);
Serial.print(F(" numSens: ")); Serial.print(F(" numSens: "));
Serial.println(ubxDataStruct.numSens); Serial.println(ubxDataStruct->numSens);
for (uint8_t num = 0; num < ubxDataStruct.numSens; num++) // For each sensor for (uint8_t num = 0; num < ubxDataStruct->numSens; num++) // For each sensor
{ {
Serial.print(F("Sensor ")); Serial.print(F("Sensor "));
Serial.print(num); Serial.print(num);
UBX_ESF_STATUS_sensorStatus_t sensorStatus; UBX_ESF_STATUS_sensorStatus_t sensorStatus;
myGNSS.getSensorFusionStatus(&sensorStatus, ubxDataStruct, num); // Extract the data for one sensor myGNSS.getSensorFusionStatus(&sensorStatus, *ubxDataStruct, num); // Extract the data for one sensor
Serial.print(F(": Type: ")); Serial.print(F(": Type: "));
Serial.print(sensorStatus.sensStatus1.bits.type); Serial.print(sensorStatus.sensStatus1.bits.type);
@@ -156,16 +156,16 @@ void setup()
myGNSS.setI2CpollingWait(50); //Allow checkUblox to poll I2C data every 50ms to keep up with the ESF MEAS messages myGNSS.setI2CpollingWait(50); //Allow checkUblox to poll I2C data every 50ms to keep up with the ESF MEAS messages
if (myGNSS.setAutoESFALGcallback(&printESFALGdata) == true) // Enable automatic ESF ALG messages with callback to printESFALGdata if (myGNSS.setAutoESFALGcallbackPtr(&printESFALGdata) == true) // Enable automatic ESF ALG messages with callback to printESFALGdata
Serial.println(F("setAutoESFALGcallback successful")); Serial.println(F("setAutoESFALGcallback successful"));
if (myGNSS.setAutoESFINScallback(&printESFINSdata) == true) // Enable automatic ESF INS messages with callback to printESFINSdata if (myGNSS.setAutoESFINScallbackPtr(&printESFINSdata) == true) // Enable automatic ESF INS messages with callback to printESFINSdata
Serial.println(F("setAutoESFINScallback successful")); Serial.println(F("setAutoESFINScallback successful"));
if (myGNSS.setAutoESFMEAScallback(&printESFMEASdata) == true) // Enable automatic ESF MEAS messages with callback to printESFMEASdata if (myGNSS.setAutoESFMEAScallbackPtr(&printESFMEASdata) == true) // Enable automatic ESF MEAS messages with callback to printESFMEASdata
Serial.println(F("setAutoESFMEAScallback successful")); Serial.println(F("setAutoESFMEAScallback successful"));
if (myGNSS.setAutoESFSTATUScallback(&printESFSTATUSdata) == true) // Enable automatic ESF STATUS messages with callback to printESFSTATUSdata if (myGNSS.setAutoESFSTATUScallbackPtr(&printESFSTATUSdata) == true) // Enable automatic ESF STATUS messages with callback to printESFSTATUSdata
Serial.println(F("setAutoESFSTATUScallback successful")); Serial.println(F("setAutoESFSTATUScallback successful"));
} }
@@ -31,38 +31,38 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void newRAWX(UBX_RXM_RAWX_data_t ubxDataStruct) void newRAWX(UBX_RXM_RAWX_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("New RAWX data received. It contains ")); Serial.print(F("New RAWX data received. It contains "));
Serial.print(ubxDataStruct.header.numMeas); // Print numMeas (Number of measurements / blocks) Serial.print(ubxDataStruct->header.numMeas); // Print numMeas (Number of measurements / blocks)
Serial.println(F(" data blocks:")); Serial.println(F(" data blocks:"));
for (uint8_t block = 0; block < ubxDataStruct.header.numMeas; block++) // For each block for (uint8_t block = 0; block < ubxDataStruct->header.numMeas; block++) // For each block
{ {
Serial.print(F("GNSS ID: ")); Serial.print(F("GNSS ID: "));
if (ubxDataStruct.blocks[block].gnssId < 100) Serial.print(F(" ")); // Align the gnssId if (ubxDataStruct->blocks[block].gnssId < 100) Serial.print(F(" ")); // Align the gnssId
if (ubxDataStruct.blocks[block].gnssId < 10) Serial.print(F(" ")); // Align the gnssId if (ubxDataStruct->blocks[block].gnssId < 10) Serial.print(F(" ")); // Align the gnssId
Serial.print(ubxDataStruct.blocks[block].gnssId); Serial.print(ubxDataStruct->blocks[block].gnssId);
Serial.print(F(" SV ID: ")); Serial.print(F(" SV ID: "));
if (ubxDataStruct.blocks[block].svId < 100) Serial.print(F(" ")); // Align the svId if (ubxDataStruct->blocks[block].svId < 100) Serial.print(F(" ")); // Align the svId
if (ubxDataStruct.blocks[block].svId < 10) Serial.print(F(" ")); // Align the svId if (ubxDataStruct->blocks[block].svId < 10) Serial.print(F(" ")); // Align the svId
Serial.print(ubxDataStruct.blocks[block].svId); Serial.print(ubxDataStruct->blocks[block].svId);
if (sizeof(double) == 8) // Check if our processor supports 64-bit double if (sizeof(double) == 8) // Check if our processor supports 64-bit double
{ {
// Convert prMes from uint8_t[8] to 64-bit double // Convert prMes from uint8_t[8] to 64-bit double
// prMes is little-endian // prMes is little-endian
double pseudorange; double pseudorange;
memcpy(&pseudorange, &ubxDataStruct.blocks[block].prMes, 8); memcpy(&pseudorange, &ubxDataStruct->blocks[block].prMes, 8);
Serial.print(F(" PR: ")); Serial.print(F(" PR: "));
Serial.print(pseudorange, 3); Serial.print(pseudorange, 3);
// Convert cpMes from uint8_t[8] to 64-bit double // Convert cpMes from uint8_t[8] to 64-bit double
// cpMes is little-endian // cpMes is little-endian
double carrierPhase; double carrierPhase;
memcpy(&carrierPhase, &ubxDataStruct.blocks[block].cpMes, 8); memcpy(&carrierPhase, &ubxDataStruct->blocks[block].cpMes, 8);
Serial.print(F(" m CP: ")); Serial.print(F(" m CP: "));
Serial.print(carrierPhase, 3); Serial.print(carrierPhase, 3);
Serial.print(F(" cycles")); Serial.print(F(" cycles"));
@@ -94,7 +94,7 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one solution per second (RAWX produces a _lot_ of data!) myGNSS.setNavigationFrequency(1); //Produce one solution per second (RAWX produces a _lot_ of data!)
myGNSS.setAutoRXMRAWXcallback(&newRAWX); // Enable automatic RXM RAWX messages with callback to newRAWX myGNSS.setAutoRXMRAWXcallbackPtr(&newRAWX); // Enable automatic RXM RAWX messages with callback to newRAWX
} }
void loop() void loop()
@@ -31,21 +31,21 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void newNAVSAT(UBX_NAV_SAT_data_t ubxDataStruct) void newNAVSAT(UBX_NAV_SAT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("New NAV SAT data received. It contains data for ")); Serial.print(F("New NAV SAT data received. It contains data for "));
Serial.print(ubxDataStruct.header.numSvs); Serial.print(ubxDataStruct->header.numSvs);
if (ubxDataStruct.header.numSvs == 1) if (ubxDataStruct->header.numSvs == 1)
Serial.println(F(" SV.")); Serial.println(F(" SV."));
else else
Serial.println(F(" SVs.")); Serial.println(F(" SVs."));
// Just for giggles, print the signal strength for each SV as a barchart // Just for giggles, print the signal strength for each SV as a barchart
for (uint16_t block = 0; block < ubxDataStruct.header.numSvs; block++) // For each SV for (uint16_t block = 0; block < ubxDataStruct->header.numSvs; block++) // For each SV
{ {
switch (ubxDataStruct.blocks[block].gnssId) // Print the GNSS ID switch (ubxDataStruct->blocks[block].gnssId) // Print the GNSS ID
{ {
case 0: case 0:
Serial.print(F("GPS ")); Serial.print(F("GPS "));
@@ -73,14 +73,14 @@ void newNAVSAT(UBX_NAV_SAT_data_t ubxDataStruct)
break; break;
} }
Serial.print(ubxDataStruct.blocks[block].svId); // Print the SV ID Serial.print(ubxDataStruct->blocks[block].svId); // Print the SV ID
if (ubxDataStruct.blocks[block].svId < 10) Serial.print(F(" ")); if (ubxDataStruct->blocks[block].svId < 10) Serial.print(F(" "));
else if (ubxDataStruct.blocks[block].svId < 100) Serial.print(F(" ")); else if (ubxDataStruct->blocks[block].svId < 100) Serial.print(F(" "));
else Serial.print(F(" ")); else Serial.print(F(" "));
// Print the signal strength as a bar chart // Print the signal strength as a bar chart
for (uint8_t cno = 0; cno < ubxDataStruct.blocks[block].cno; cno++) for (uint8_t cno = 0; cno < ubxDataStruct->blocks[block].cno; cno++)
Serial.print(F("=")); Serial.print(F("="));
Serial.println(); Serial.println();
@@ -108,7 +108,7 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one solution per second myGNSS.setNavigationFrequency(1); //Produce one solution per second
myGNSS.setAutoNAVSATcallback(&newNAVSAT); // Enable automatic NAV SAT messages with callback to newNAVSAT myGNSS.setAutoNAVSATcallbackPtr(&newNAVSAT); // Enable automatic NAV SAT messages with callback to newNAVSAT
} }
void loop() void loop()
@@ -22,9 +22,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -69,6 +67,7 @@ File myFile; //File that all GNSS data is written to
#endif #endif
#define packetLength 100 // NAV PVT is 92 + 8 bytes in length (including the sync chars, class, id, length and checksum bytes) #define packetLength 100 // NAV PVT is 92 + 8 bytes in length (including the sync chars, class, id, length and checksum bytes)
uint8_t *myBuffer; // Use myBuffer to hold the data while we write it to SD card
// Callback: printPVTdata will be called when new NAV PVT data arrives // Callback: printPVTdata will be called when new NAV PVT data arrives
// See u-blox_structs.h for the full definition of UBX_NAV_PVT_data_t // See u-blox_structs.h for the full definition of UBX_NAV_PVT_data_t
@@ -77,38 +76,38 @@ File myFile; //File that all GNSS data is written to
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct) void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("Time: ")); // Print the time Serial.print(F("Time: ")); // Print the time
uint8_t hms = ubxDataStruct.hour; // Print the hours uint8_t hms = ubxDataStruct->hour; // Print the hours
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.min; // Print the minutes hms = ubxDataStruct->min; // Print the minutes
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.sec; // Print the seconds hms = ubxDataStruct->sec; // Print the seconds
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(".")); Serial.print(F("."));
unsigned long millisecs = ubxDataStruct.iTOW % 1000; // Print the milliseconds unsigned long millisecs = ubxDataStruct->iTOW % 1000; // Print the milliseconds
if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly
if (millisecs < 10) Serial.print(F("0")); if (millisecs < 10) Serial.print(F("0"));
Serial.print(millisecs); Serial.print(millisecs);
long latitude = ubxDataStruct.lat; // Print the latitude long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F(" Lat: ")); Serial.print(F(" Lat: "));
Serial.print(latitude); Serial.print(latitude);
long longitude = ubxDataStruct.lon; // Print the longitude long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: ")); Serial.print(F(" Long: "));
Serial.print(longitude); Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)")); Serial.print(F(" (degrees * 10^-7)"));
long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level long altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Height above MSL: ")); Serial.print(F(" Height above MSL: "));
Serial.print(altitude); Serial.print(altitude);
Serial.println(F(" (mm)")); Serial.println(F(" (mm)"));
@@ -200,10 +199,12 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
myGNSS.logNAVPVT(); // Enable NAV PVT data logging myGNSS.logNAVPVT(); // Enable NAV PVT data logging
myBuffer = new uint8_t[packetLength]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
} }
@@ -214,9 +215,7 @@ void loop()
if (myGNSS.fileBufferAvailable() >= packetLength) // Check to see if a new packetLength-byte NAV PVT message has been stored if (myGNSS.fileBufferAvailable() >= packetLength) // Check to see if a new packetLength-byte NAV PVT message has been stored
{ {
uint8_t myBuffer[packetLength]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, packetLength); // Extract exactly packetLength bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, packetLength); // Extract exactly packetLength bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, packetLength); // Write exactly packetLength bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, packetLength); // Write exactly packetLength bytes from myBuffer to the ubxDataFile on the SD card
@@ -22,9 +22,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -82,6 +80,7 @@ File myFile; //File that all GNSS data is written to
#endif #endif
#define packetLength 36 // TIM TM2 is 28 + 8 bytes in length (including the sync chars, class, id, length and checksum bytes) #define packetLength 36 // TIM TM2 is 28 + 8 bytes in length (including the sync chars, class, id, length and checksum bytes)
uint8_t *myBuffer; // Use myBuffer to hold the data while we write it to SD card
int dotsPrinted = 0; // Print dots in rows of 50 while waiting for a TIM TM2 message int dotsPrinted = 0; // Print dots in rows of 50 while waiting for a TIM TM2 message
@@ -92,30 +91,30 @@ int dotsPrinted = 0; // Print dots in rows of 50 while waiting for a TIM TM2 mes
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printTIMTM2data(UBX_TIM_TM2_data_t ubxDataStruct) void printTIMTM2data(UBX_TIM_TM2_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("newFallingEdge: ")); // 1 if a new falling edge was detected Serial.print(F("newFallingEdge: ")); // 1 if a new falling edge was detected
Serial.print(ubxDataStruct.flags.bits.newFallingEdge); Serial.print(ubxDataStruct->flags.bits.newFallingEdge);
Serial.print(F(" newRisingEdge: ")); // 1 if a new rising edge was detected Serial.print(F(" newRisingEdge: ")); // 1 if a new rising edge was detected
Serial.print(ubxDataStruct.flags.bits.newRisingEdge); Serial.print(ubxDataStruct->flags.bits.newRisingEdge);
Serial.print(F(" Rising Edge Counter: ")); // Rising edge counter Serial.print(F(" Rising Edge Counter: ")); // Rising edge counter
Serial.print(ubxDataStruct.count); Serial.print(ubxDataStruct->count);
Serial.print(F(" towMsR: ")); // Time Of Week of rising edge (ms) Serial.print(F(" towMsR: ")); // Time Of Week of rising edge (ms)
Serial.print(ubxDataStruct.towMsR); Serial.print(ubxDataStruct->towMsR);
Serial.print(F(" towSubMsR: ")); // Millisecond fraction of Time Of Week of rising edge in nanoseconds Serial.print(F(" towSubMsR: ")); // Millisecond fraction of Time Of Week of rising edge in nanoseconds
Serial.print(ubxDataStruct.towSubMsR); Serial.print(ubxDataStruct->towSubMsR);
Serial.print(F(" towMsF: ")); // Time Of Week of falling edge (ms) Serial.print(F(" towMsF: ")); // Time Of Week of falling edge (ms)
Serial.print(ubxDataStruct.towMsF); Serial.print(ubxDataStruct->towMsF);
Serial.print(F(" towSubMsF: ")); // Millisecond fraction of Time Of Week of falling edge in nanoseconds Serial.print(F(" towSubMsF: ")); // Millisecond fraction of Time Of Week of falling edge in nanoseconds
Serial.println(ubxDataStruct.towSubMsF); Serial.println(ubxDataStruct->towSubMsF);
dotsPrinted = 0; // Reset dotsPrinted dotsPrinted = 0; // Reset dotsPrinted
} }
@@ -206,10 +205,12 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second
myGNSS.setAutoTIMTM2callback(&printTIMTM2data); // Enable automatic TIM TM2 messages with callback to printTIMTM2data myGNSS.setAutoTIMTM2callbackPtr(&printTIMTM2data); // Enable automatic TIM TM2 messages with callback to printTIMTM2data
myGNSS.logTIMTM2(); // Enable TIM TM2 data logging myGNSS.logTIMTM2(); // Enable TIM TM2 data logging
myBuffer = new uint8_t[packetLength]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
} }
@@ -220,9 +221,7 @@ void loop()
if (myGNSS.fileBufferAvailable() >= packetLength) // Check to see if a new packetLength-byte TIM TM2 message has been stored if (myGNSS.fileBufferAvailable() >= packetLength) // Check to see if a new packetLength-byte TIM TM2 message has been stored
{ {
uint8_t myBuffer[packetLength]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, packetLength); // Extract exactly packetLength bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, packetLength); // Extract exactly packetLength bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, packetLength); // Write exactly packetLength bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, packetLength); // Write exactly packetLength bytes from myBuffer to the ubxDataFile on the SD card
@@ -34,9 +34,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -76,6 +74,7 @@ File myFile; //File that all GNSS data is written to
#define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes #define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes
#define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage #define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage
uint8_t *myBuffer; // Use myBuffer to hold the data while we write it to SD card
unsigned long lastPrint; // Record when the last Serial print took place unsigned long lastPrint; // Record when the last Serial print took place
@@ -90,10 +89,10 @@ int numRAWX = 0; // Keep count of how many RAWX message groups have been receive
// See u-blox_structs.h for the full definition of UBX_RXMSFRBX_data_t // See u-blox_structs.h for the full definition of UBX_RXMSFRBX_data_t
// _____ You can use any name you like for the callback. Use the same name when you call setAutoRXMSFRBXcallback // _____ You can use any name you like for the callback. Use the same name when you call setAutoRXMSFRBXcallback
// / _____ This _must_ be UBX_RXM_SFRBX_data_t // / _____ This _must_ be UBX_RXM_SFRBX_data_t
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void newSFRBX(UBX_RXM_SFRBX_data_t ubxDataStruct) void newSFRBX(UBX_RXM_SFRBX_data_t *ubxDataStruct)
{ {
numSFRBX++; // Increment the count numSFRBX++; // Increment the count
} }
@@ -105,7 +104,7 @@ void newSFRBX(UBX_RXM_SFRBX_data_t ubxDataStruct)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void newRAWX(UBX_RXM_RAWX_data_t ubxDataStruct) void newRAWX(UBX_RXM_RAWX_data_t *ubxDataStruct)
{ {
numRAWX++; // Increment the count numRAWX++; // Increment the count
} }
@@ -202,14 +201,16 @@ void setup()
myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second (that's plenty for Precise Point Positioning) myGNSS.setNavigationFrequency(1); //Produce one navigation solution per second (that's plenty for Precise Point Positioning)
myGNSS.setAutoRXMSFRBXcallback(&newSFRBX); // Enable automatic RXM SFRBX messages with callback to newSFRBX myGNSS.setAutoRXMSFRBXcallbackPtr(&newSFRBX); // Enable automatic RXM SFRBX messages with callback to newSFRBX
myGNSS.logRXMSFRBX(); // Enable RXM SFRBX data logging myGNSS.logRXMSFRBX(); // Enable RXM SFRBX data logging
myGNSS.setAutoRXMRAWXcallback(&newRAWX); // Enable automatic RXM RAWX messages with callback to newRAWX myGNSS.setAutoRXMRAWXcallbackPtr(&newRAWX); // Enable automatic RXM RAWX messages with callback to newRAWX
myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging
myBuffer = new uint8_t[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
lastPrint = millis(); // Initialize lastPrint lastPrint = millis(); // Initialize lastPrint
@@ -228,9 +229,7 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card
@@ -273,15 +272,13 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time
if (bytesToWrite > sdWriteSize) if (bytesToWrite > sdWriteSize)
{ {
bytesToWrite = sdWriteSize; bytesToWrite = sdWriteSize;
} }
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer myGNSS.extractFileBufferData(myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card
@@ -35,9 +35,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -77,6 +75,7 @@ File myFile; //File that all GNSS data is written to
#define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes #define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes
#define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage #define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage
uint8_t *myBuffer; // A buffer to hold the data while we write it to SD card
unsigned long lastPrint; // Record when the last Serial print took place unsigned long lastPrint; // Record when the last Serial print took place
unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card
@@ -181,6 +180,8 @@ void setup()
myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging
myBuffer = new uint8_t[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
lastPrint = millis(); // Initialize lastPrint lastPrint = millis(); // Initialize lastPrint
@@ -198,9 +199,7 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card
@@ -242,15 +241,13 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time
if (bytesToWrite > sdWriteSize) if (bytesToWrite > sdWriteSize)
{ {
bytesToWrite = sdWriteSize; bytesToWrite = sdWriteSize;
} }
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer myGNSS.extractFileBufferData(myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card
@@ -35,9 +35,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -77,6 +75,7 @@ File myFile; //File that all GNSS data is written to
#define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes #define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes
#define fileBufferSize 32768 // Allocate 32KBytes of RAM for UBX message storage #define fileBufferSize 32768 // Allocate 32KBytes of RAM for UBX message storage
uint8_t *myBuffer; // A buffer to hold the data while we write it to SD card
unsigned long lastPrint; // Record when the last Serial print took place unsigned long lastPrint; // Record when the last Serial print took place
unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card
@@ -196,6 +195,8 @@ void setup()
myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging myGNSS.logRXMRAWX(); // Enable RXM RAWX data logging
myBuffer = new uint8_t[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
lastPrint = millis(); // Initialize lastPrint lastPrint = millis(); // Initialize lastPrint
@@ -213,9 +214,7 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card
@@ -263,15 +262,13 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time
if (bytesToWrite > sdWriteSize) if (bytesToWrite > sdWriteSize)
{ {
bytesToWrite = sdWriteSize; bytesToWrite = sdWriteSize;
} }
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer myGNSS.extractFileBufferData(myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card
@@ -24,9 +24,7 @@
Insert a formatted micro-SD card into the socket on the Carrier Board. Insert a formatted micro-SD card into the socket on the Carrier Board.
Connect the Carrier Board to your computer using a USB-C cable. Connect the Carrier Board to your computer using a USB-C cable.
Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3 Ensure you have the SparkFun Apollo3 boards installed: http://boardsmanager/All#SparkFun_Apollo3
This code has been tested using version 2.1.0 of the Apollo3 boards on Arduino IDE 1.8.13. This code has been tested using version 2.2.0 of the Apollo3 boards on Arduino IDE 1.8.13.
- Version 2.1.1 of Apollo3 contains a feature which makes I2C communication with u-blox modules problematic
- We recommend using v2.1.0 of Apollo3 until v2.2.0 is released
Select "Artemis MicroMod Processor" as the board type. Select "Artemis MicroMod Processor" as the board type.
Press upload to upload the code onto the Artemis. Press upload to upload the code onto the Artemis.
Open the Serial Monitor at 115200 baud to see the output. Open the Serial Monitor at 115200 baud to see the output.
@@ -68,6 +66,7 @@ File myFile; //File that all GNSS data is written to
#define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes #define sdWriteSize 512 // Write data to the SD card in blocks of 512 bytes
#define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage #define fileBufferSize 16384 // Allocate 16KBytes of RAM for UBX message storage
uint8_t *myBuffer; // A buffer to hold the data while we write it to SD card
unsigned long lastPrint; // Record when the last Serial print took place unsigned long lastPrint; // Record when the last Serial print took place
unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card unsigned long bytesWritten = 0; // Record how many bytes have been written to SD card
@@ -175,6 +174,8 @@ void setup()
myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_ALL); // Enable logging of all enabled NMEA messages myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_ALL); // Enable logging of all enabled NMEA messages
//myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_GGA | SFE_UBLOX_FILTER_NMEA_GSA); // Or we can, for example, log only GxGGA & GxGSA and ignore GxGSV //myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_GGA | SFE_UBLOX_FILTER_NMEA_GSA); // Or we can, for example, log only GxGGA & GxGSA and ignore GxGSV
myBuffer = new uint8_t[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
Serial.println(F("Press any key to stop logging.")); Serial.println(F("Press any key to stop logging."));
lastPrint = millis(); // Initialize lastPrint lastPrint = millis(); // Initialize lastPrint
@@ -192,9 +193,7 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN each time we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card myGNSS.extractFileBufferData(myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, sdWriteSize); // Extract exactly sdWriteSize bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, sdWriteSize); // Write exactly sdWriteSize bytes from myBuffer to the ubxDataFile on the SD card
@@ -236,15 +235,13 @@ void loop()
{ {
digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card digitalWrite(LED_BUILTIN, HIGH); // Flash LED_BUILTIN while we write to the SD card
uint8_t myBuffer[sdWriteSize]; // Create our own buffer to hold the data while we write it to SD card
uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time uint16_t bytesToWrite = remainingBytes; // Write the remaining bytes to SD card sdWriteSize bytes at a time
if (bytesToWrite > sdWriteSize) if (bytesToWrite > sdWriteSize)
{ {
bytesToWrite = sdWriteSize; bytesToWrite = sdWriteSize;
} }
myGNSS.extractFileBufferData((uint8_t *)&myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer myGNSS.extractFileBufferData(myBuffer, bytesToWrite); // Extract bytesToWrite bytes from the UBX file buffer and put them into myBuffer
myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card myFile.write(myBuffer, bytesToWrite); // Write bytesToWrite bytes from myBuffer to the ubxDataFile on the SD card
@@ -41,27 +41,27 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printHPdata(UBX_NAV_HPPOSLLH_data_t ubxDataStruct) void printHPdata(UBX_NAV_HPPOSLLH_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
long highResLatitude = ubxDataStruct.lat; long highResLatitude = ubxDataStruct->lat;
Serial.print(F("Hi Res Lat: ")); Serial.print(F("Hi Res Lat: "));
Serial.print(highResLatitude); Serial.print(highResLatitude);
int highResLatitudeHp = ubxDataStruct.latHp; int highResLatitudeHp = ubxDataStruct->latHp;
Serial.print(F(" ")); Serial.print(F(" "));
Serial.print(highResLatitudeHp); Serial.print(highResLatitudeHp);
long highResLongitude = ubxDataStruct.lon; long highResLongitude = ubxDataStruct->lon;
Serial.print(F(" Hi Res Long: ")); Serial.print(F(" Hi Res Long: "));
Serial.print(highResLongitude); Serial.print(highResLongitude);
int highResLongitudeHp = ubxDataStruct.lonHp; int highResLongitudeHp = ubxDataStruct->lonHp;
Serial.print(F(" ")); Serial.print(F(" "));
Serial.print(highResLongitudeHp); Serial.print(highResLongitudeHp);
float horizAccuracy = ((float)ubxDataStruct.hAcc) / 10000.0; // Convert hAcc from mm*0.1 to m float horizAccuracy = ((float)ubxDataStruct->hAcc) / 10000.0; // Convert hAcc from mm*0.1 to m
Serial.print(F(" Horiz accuracy: ")); Serial.print(F(" Horiz accuracy: "));
Serial.println(horizAccuracy); Serial.println(horizAccuracy);
} }
@@ -73,38 +73,38 @@ void printHPdata(UBX_NAV_HPPOSLLH_data_t ubxDataStruct)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct) void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{ {
Serial.println(); Serial.println();
Serial.print(F("Time: ")); // Print the time Serial.print(F("Time: ")); // Print the time
uint8_t hms = ubxDataStruct.hour; // Print the hours uint8_t hms = ubxDataStruct->hour; // Print the hours
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.min; // Print the minutes hms = ubxDataStruct->min; // Print the minutes
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(":")); Serial.print(F(":"));
hms = ubxDataStruct.sec; // Print the seconds hms = ubxDataStruct->sec; // Print the seconds
if (hms < 10) Serial.print(F("0")); // Print a leading zero if required if (hms < 10) Serial.print(F("0")); // Print a leading zero if required
Serial.print(hms); Serial.print(hms);
Serial.print(F(".")); Serial.print(F("."));
unsigned long millisecs = ubxDataStruct.iTOW % 1000; // Print the milliseconds unsigned long millisecs = ubxDataStruct->iTOW % 1000; // Print the milliseconds
if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly if (millisecs < 100) Serial.print(F("0")); // Print the trailing zeros correctly
if (millisecs < 10) Serial.print(F("0")); if (millisecs < 10) Serial.print(F("0"));
Serial.print(millisecs); Serial.print(millisecs);
long latitude = ubxDataStruct.lat; // Print the latitude long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F(" Lat: ")); Serial.print(F(" Lat: "));
Serial.print(latitude); Serial.print(latitude);
long longitude = ubxDataStruct.lon; // Print the longitude long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: ")); Serial.print(F(" Long: "));
Serial.print(longitude); Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)")); Serial.print(F(" (degrees * 10^-7)"));
long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level long altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Height above MSL: ")); Serial.print(F(" Height above MSL: "));
Serial.print(altitude); Serial.print(altitude);
Serial.println(F(" (mm)")); Serial.println(F(" (mm)"));
@@ -135,9 +135,9 @@ void setup()
myGNSS.setNavigationFrequency(2); //Produce two solutions per second myGNSS.setNavigationFrequency(2); //Produce two solutions per second
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
myGNSS.setAutoHPPOSLLHcallback(&printHPdata); // Enable automatic NAV HPPOSLLH messages with callback to printHPdata myGNSS.setAutoHPPOSLLHcallbackPtr(&printHPdata); // Enable automatic NAV HPPOSLLH messages with callback to printHPdata
} }
void loop() void loop()
@@ -69,16 +69,16 @@ WiFiClient ntripClient; // The WiFi connection to the NTRIP server. This is glob
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void pushGPGGA(NMEA_GGA_data_t nmeaData) void pushGPGGA(NMEA_GGA_data_t *nmeaData)
{ {
//Provide the caster with our current position as needed //Provide the caster with our current position as needed
if ((ntripClient.connected() == true) && (transmitLocation == true)) if ((ntripClient.connected() == true) && (transmitLocation == true))
{ {
Serial.print(F("Pushing GGA to server: ")); Serial.print(F("Pushing GGA to server: "));
Serial.print((const char *)nmeaData.nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end Serial.print((const char *)nmeaData->nmea); // .nmea is printable (NULL-terminated) and already has \r\n on the end
//Push our current GGA sentence to caster //Push our current GGA sentence to caster
ntripClient.print((const char *)nmeaData.nmea); ntripClient.print((const char *)nmeaData->nmea);
} }
} }
@@ -91,26 +91,21 @@ void pushGPGGA(NMEA_GGA_data_t nmeaData)
// | / _____ You can use any name you like for the struct // | / _____ You can use any name you like for the struct
// | | / // | | /
// | | | // | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct) void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{ {
long latitude = ubxDataStruct.lat; // Print the latitude double latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F("Lat: ")); Serial.print(F("Lat: "));
Serial.print(latitude / 10000000L); Serial.print(latitude / 10000000.0, 7);
Serial.print(F("."));
Serial.print(abs(latitude % 10000000L));
long longitude = ubxDataStruct.lon; // Print the longitude double longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: ")); Serial.print(F(" Long: "));
Serial.print(longitude / 10000000L); Serial.print(longitude / 10000000.0, 7);
Serial.print(F("."));
Serial.print(abs(longitude % 10000000L));
long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level double altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Height: ")); Serial.print(F(" Height: "));
Serial.print(altitude); Serial.print(altitude / 1000.0, 3);
Serial.print(F(" (mm)"));
uint8_t fixType = ubxDataStruct.fixType; // Print the fix type uint8_t fixType = ubxDataStruct->fixType; // Print the fix type
Serial.print(F(" Fix: ")); Serial.print(F(" Fix: "));
Serial.print(fixType); Serial.print(fixType);
if (fixType == 0) if (fixType == 0)
@@ -128,7 +123,7 @@ void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct)
else else
Serial.print(F(" (UNKNOWN)")); Serial.print(F(" (UNKNOWN)"));
uint8_t carrSoln = ubxDataStruct.flags.bits.carrSoln; // Print the carrier solution uint8_t carrSoln = ubxDataStruct->flags.bits.carrSoln; // Print the carrier solution
Serial.print(F(" Carrier Solution: ")); Serial.print(F(" Carrier Solution: "));
Serial.print(carrSoln); Serial.print(carrSoln);
if (carrSoln == 0) if (carrSoln == 0)
@@ -140,7 +135,7 @@ void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct)
else else
Serial.print(F(" (UNKNOWN)")); Serial.print(F(" (UNKNOWN)"));
uint32_t hAcc = ubxDataStruct.hAcc; // Print the horizontal accuracy estimate uint32_t hAcc = ubxDataStruct->hAcc; // Print the horizontal accuracy estimate
Serial.print(F(" Horizontal Accuracy Estimate: ")); Serial.print(F(" Horizontal Accuracy Estimate: "));
Serial.print(hAcc); Serial.print(hAcc);
Serial.print(F(" (mm)")); Serial.print(F(" (mm)"));
@@ -159,9 +154,8 @@ void setup()
while (myGNSS.begin() == false) //Connect to the Ublox module using Wire port while (myGNSS.begin() == false) //Connect to the Ublox module using Wire port
{ {
Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring."));
delay(2000); delay(2000);
//while (1);
} }
Serial.println(F("u-blox module connected")); Serial.println(F("u-blox module connected"));
@@ -175,11 +169,11 @@ void setup()
// Set the Main Talker ID to "GP". The NMEA GGA messages will be GPGGA instead of GNGGA // Set the Main Talker ID to "GP". The NMEA GGA messages will be GPGGA instead of GNGGA
myGNSS.setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GP); myGNSS.setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GP);
myGNSS.setNMEAGPGGAcallback(&pushGPGGA); // Set up the callback for GPGGA myGNSS.setNMEAGPGGAcallbackPtr(&pushGPGGA); // Set up the callback for GPGGA
myGNSS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C, 10); // Tell the module to output GGA every 10 seconds myGNSS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C, 10); // Tell the module to output GGA every 10 seconds
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata so we can watch the carrier solution go to fixed myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata so we can watch the carrier solution go to fixed
//myGNSS.saveConfiguration(VAL_CFG_SUBSEC_IOPORT | VAL_CFG_SUBSEC_MSGCONF); //Optional: Save the ioPort and message settings to NVM //myGNSS.saveConfiguration(VAL_CFG_SUBSEC_IOPORT | VAL_CFG_SUBSEC_MSGCONF); //Optional: Save the ioPort and message settings to NVM
@@ -10,9 +10,9 @@
It's confusing, but the Arduino is acting as a 'client' to the PointPerfect SSR correction service. It's confusing, but the Arduino is acting as a 'client' to the PointPerfect SSR correction service.
You will need to have a valid u-blox Thingstream account and have a PointPerfect Thing and payed plan. You will need to have a valid u-blox Thingstream account and have a PointPerfect Thing and payed plan.
Thingstream offers SSR corrections to SPARTN cabalble RTK receivers such as the u-blox ZED-F9 series Thingstream offers SSR corrections to SPARTN capable RTK receivers such as the u-blox ZED-F9 series
in continental Europ and US. There Network is planned to be expanded to ther regions over next years. in continental Europe and US. Their Network is planned to be expanded to other regions over the next years.
To see sign up go to https://portal.thingstream.io/app/location-services/things To sign up, go to: https://portal.thingstream.io/app/location-services/things
This is a proof of concept to show how to connect via MQTT to get SPARTN SSR correction. This is a proof of concept to show how to connect via MQTT to get SPARTN SSR correction.
Using WiFi for a rover is generally a bad idea because of limited WiFi range in the field. Using WiFi for a rover is generally a bad idea because of limited WiFi range in the field.
@@ -38,10 +38,10 @@
*/ */
#include <WiFi.h> #include <WiFi.h>
#include <WiFiClientSecure.h> #include <WiFiClientSecure.h>
#include <ArduinoMqttClient.h> #include <ArduinoMqttClient.h> // Click here to get the library: http://librarymanager/All#ArduinoMqttClient
#include "secrets.h" #include "secrets.h"
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS #include <SparkFun_u-blox_GNSS_Arduino_Library.h> // Click here to get the library: http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GNSS myGNSS; SFE_UBLOX_GNSS myGNSS;
//Global variables //Global variables
@@ -55,7 +55,7 @@ void setup()
Serial.begin(115200); Serial.begin(115200);
while (!Serial); while (!Serial);
Serial.println(F("PointPerfect testing")); Serial.println(F("PointPerfect testing"));
Wire.begin(); //Start I2C Wire.begin(); //Start I2C
if (myGNSS.begin() == false) //Connect to the Ublox module using Wire port if (myGNSS.begin() == false) //Connect to the Ublox module using Wire port
@@ -0,0 +1,212 @@
/*
Use the NEO-D9S L-Band receiver to provide corrections to a ZED-F9x via UBX-RXM-PMP messages
By: SparkFun Electronics / Paul Clark
Based on original code by: u-blox AG / Michael Ammann
Date: February 7th, 2022
License: MIT. See license file for more information but you can
basically do whatever you want with this code.
This example shows how to obtain SPARTN correction data from a NEO-D9S L-Band receiver and push it over I2C to a ZED-F9x.
This is a proof of concept to show how the UBX-RXM-PMP corrections control the accuracy.
You will need a Thingstream PointPerfect account to be able to access the SPARTN Credentials (IP Dynamic Keys).
Copy and paste the Current Key and Next Key into secrets.h.
Feel like supporting open source hardware?
Buy a board from SparkFun!
ZED-F9P RTK2: https://www.sparkfun.com/products/16481
NEO-D9S: Coming soon!
Hardware Connections:
Use Qwiic cables to connect the NEO-D9S and ZED-F9x GNSS to your board
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
Open the serial monitor at 115200 baud to see the output
*/
#include "secrets.h" // <- Copy and paste the Current Key and Next Key into secrets.h
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GNSS myGNSS; // ZED-F9x
SFE_UBLOX_GNSS myLBand; // NEO-D9S
const uint32_t myLBandFreq = 1556290000; // Uncomment this line to use the US SPARTN 1.8 service
//const uint32_t myLBandFreq = 1545260000; // Uncomment this line to use the EU SPARTN 1.8 service
#define OK(ok) (ok ? F(" -> OK") : F(" -> ERROR!")) // Convert uint8_t into OK/ERROR
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Callback: pushRXMPMP will be called when new PMP data arrives
// See u-blox_structs.h for the full definition of UBX_RXM_PMP_message_data_t
// _____ You can use any name you like for the callback. Use the same name when you call setRXMPMPmessageCallbackPtr
// / _____ This _must_ be UBX_RXM_PMP_message_data_t
// | / _____ You can use any name you like for the struct
// | | /
// | | |
void pushRXMPMP(UBX_RXM_PMP_message_data_t *pmpData)
{
//Extract the raw message payload length
uint16_t payloadLen = ((uint16_t)pmpData->lengthMSB << 8) | (uint16_t)pmpData->lengthLSB;
Serial.print(F("New RXM-PMP data received. Message payload length is "));
Serial.print(payloadLen);
Serial.println(F(" Bytes. Pushing it to the GNSS..."));
//Push the PMP data to the GNSS
//The payload length could be variable, so we need to push the header and payload, then checksum
myGNSS.pushRawData(&pmpData->sync1, (size_t)payloadLen + 6); // Push the sync chars, class, ID, length and payload
myGNSS.pushRawData(&pmpData->checksumA, (size_t)2); // Push the checksum bytes
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Callback: printPVTdata will be called when new NAV PVT data arrives
// See u-blox_structs.h for the full definition of UBX_NAV_PVT_data_t
// _____ You can use any name you like for the callback. Use the same name when you call setAutoPVTcallbackPtr
// / _____ This _must_ be UBX_NAV_PVT_data_t
// | / _____ You can use any name you like for the struct
// | | /
// | | |
void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
{
double latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F("Lat: "));
Serial.print(latitude / 10000000.0, 7);
double longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: "));
Serial.print(longitude / 10000000.0, 7);
double altitude = ubxDataStruct->hMSL; // Print the height above mean sea level
Serial.print(F(" Height: "));
Serial.print(altitude / 1000.0, 3);
uint8_t fixType = ubxDataStruct->fixType; // Print the fix type
Serial.print(F(" Fix: "));
Serial.print(fixType);
if (fixType == 0)
Serial.print(F(" (None)"));
else if (fixType == 1)
Serial.print(F(" (Dead Reckoning)"));
else if (fixType == 2)
Serial.print(F(" (2D)"));
else if (fixType == 3)
Serial.print(F(" (3D)"));
else if (fixType == 3)
Serial.print(F(" (GNSS + Dead Reckoning)"));
else if (fixType == 5)
Serial.print(F(" (Time Only)"));
else
Serial.print(F(" (UNKNOWN)"));
uint8_t carrSoln = ubxDataStruct->flags.bits.carrSoln; // Print the carrier solution
Serial.print(F(" Carrier Solution: "));
Serial.print(carrSoln);
if (carrSoln == 0)
Serial.print(F(" (None)"));
else if (carrSoln == 1)
Serial.print(F(" (Floating)"));
else if (carrSoln == 2)
Serial.print(F(" (Fixed)"));
else
Serial.print(F(" (UNKNOWN)"));
uint32_t hAcc = ubxDataStruct->hAcc; // Print the horizontal accuracy estimate
Serial.print(F(" Horizontal Accuracy Estimate: "));
Serial.print(hAcc);
Serial.print(F(" (mm)"));
Serial.println();
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void setup()
{
Serial.begin(115200);
Serial.println(F("NEO-D9S SPARTN Corrections"));
Wire.begin(); //Start I2C
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Begin and configure the ZED-F9x
//myGNSS.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
while (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
{
Serial.println(F("u-blox GNSS module not detected at default I2C address. Please check wiring."));
delay(2000);
}
Serial.println(F("u-blox GNSS module connected"));
uint8_t ok = myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise
if (ok) ok = myGNSS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN); //Be sure SPARTN input is enabled
if (ok) ok = myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible
if (ok) ok = myGNSS.setNavigationFrequency(1); //Set output in Hz.
if (ok) ok = myGNSS.setVal8(UBLOX_CFG_SPARTN_USE_SOURCE, 1); // use LBAND PMP message
//Configure the SPARTN IP Dynamic Keys
//"When the receiver boots, the host should send 'current' and 'next' keys in one message." - Use setDynamicSPARTNKeys for this.
//"Every time the 'current' key is expired, 'next' takes its place."
//"Therefore the host should then retrieve the new 'next' key and send only that." - Use setDynamicSPARTNKey for this.
// The key can be provided in binary (uint8_t) format or in ASCII Hex (char) format, but in both cases keyLengthBytes _must_ represent the binary key length in bytes.
if (ok) ok = myGNSS.setDynamicSPARTNKeys(currentKeyLengthBytes, currentKeyGPSWeek, currentKeyGPSToW, currentDynamicKey,
nextKeyLengthBytes, nextKeyGPSWeek, nextKeyGPSToW, nextDynamicKey);
//if (ok) ok = myGNSS.saveConfiguration(VAL_CFG_SUBSEC_IOPORT | VAL_CFG_SUBSEC_MSGCONF); //Optional: Save the ioPort and message settings to NVM
Serial.print(F("GNSS: configuration "));
Serial.println(OK(ok));
myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata so we can watch the carrier solution go to fixed
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Begin and configure the NEO-D9S L-Band receiver
//myLBand.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
while (myLBand.begin(Wire, 0x43) == false) //Connect to the u-blox NEO-D9S using Wire port. The D9S default I2C address is 0x43 (not 0x42)
{
Serial.println(F("u-blox NEO-D9S not detected at default I2C address. Please check wiring."));
delay(2000);
}
Serial.println(F("u-blox NEO-D9S connected"));
ok = myLBand.setVal32(UBLOX_CFG_PMP_CENTER_FREQUENCY, myLBandFreq); // Default 1539812500 Hz
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_SEARCH_WINDOW, 2200); // Default 2200 Hz
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_SERVICE_ID, 0); // Default 1
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_SERVICE_ID, 21845); // Default 50821
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_DATA_RATE, 2400); // Default 2400 bps
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_DESCRAMBLER, 1); // Default 1
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_DESCRAMBLER_INIT, 26969); // Default 23560
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_PRESCRAMBLING, 0); // Default 0
if (ok) ok = myLBand.setVal64(UBLOX_CFG_PMP_UNIQUE_WORD, 16238547128276412563ull);
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // match baudrate with ZED default
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // match baudrate with ZED default
Serial.print(F("L-Band: configuration "));
Serial.println(OK(ok));
myLBand.softwareResetGNSSOnly(); // Do a restart
myLBand.setRXMPMPmessageCallbackPtr(&pushRXMPMP); // Call pushRXMPMP when new PMP data arrives. Push it to the GNSS
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void loop()
{
myGNSS.checkUblox(); // Check for the arrival of new GNSS data and process it.
myGNSS.checkCallbacks(); // Check if any GNSS callbacks are waiting to be processed.
myLBand.checkUblox(); // Check for the arrival of new PMP data and process it.
myLBand.checkCallbacks(); // Check if any LBand callbacks are waiting to be processed.
}
@@ -0,0 +1,24 @@
// You can set the information below after signing up with the u-blox Thingstream portal
// and adding a new New PointPerfect Thing
// https://portal.thingstream.io/app/location-services/things
// In the new PointPerfect Thing, you go to the credentials tab and copy and paste the IP Dynamic Keys here.
//
// The keys are valid from a particular GPS Week Number and Time of Week.
// Looking at the credentials tab, the current key expires 23:59 Feb 11th 2022.
// This means the next key is valid _from_ Midnight Feb 12th 2022.
// That is GPS Week 2196. The GPS Time of Week in seconds is 518418.
// Working backwards, the current key became valid exactly 4 weeks earlier (Midnight Jan 15th 2022).
//
// See: https://www.labsat.co.uk/index.php/en/gps-time-calculator
//
// The keys are given as: 32 hexadecimal digits = 128 bits = 16 Bytes
const uint8_t currentKeyLengthBytes = 16;
const char currentDynamicKey[] = "f742bd6b7248043177dd649141d8fb0b";
const uint16_t currentKeyGPSWeek = 2192;
const uint32_t currentKeyGPSToW = 518418;
const uint8_t nextKeyLengthBytes = 16;
const char nextDynamicKey[] = "8206........................29f4";
const uint16_t nextKeyGPSWeek = 2196;
const uint32_t nextKeyGPSToW = 518418;
@@ -0,0 +1,151 @@
0x1041000d
0x10410013
0x10510002
0x10510003
0x10520005
0x10530005
0x10530006
0x10640002
0x10640003
0x10640005
0x10640006
0x10650001
0x10650002
0x10710001
0x10720001
0x10730001
0x10740001
0x10750001
0x10760001
0x10770001
0x10780001
0x10790001
0x107a0001
0x10a20001
0x10a20002
0x10a3002e
0x10a3002f
0x10a30030
0x10a30031
0x10a30032
0x10a30033
0x10a30034
0x10a30035
0x10b10014
0x10b10016
0x10b10019
0x10c70001
0x10c70002
0x10d0000c
0x10d0000d
0x10d0000e
0x20210003
0x20410001
0x20410002
0x20410010
0x20510001
0x20520002
0x20520003
0x20520004
0x20530002
0x20530003
0x20530004
0x20640001
0x20910187
0x20910188
0x20910189
0x2091018a
0x2091018b
0x20910196
0x20910197
0x20910198
0x20910199
0x2091019a
0x2091019b
0x2091019c
0x2091019d
0x2091019e
0x2091019f
0x209101a0
0x209101a1
0x209101a2
0x209101a3
0x209101a4
0x209101a5
0x209101a6
0x209101a7
0x209101a8
0x209101a9
0x209101b4
0x209101b5
0x209101b6
0x209101b7
0x209101b8
0x209101b9
0x209101ba
0x209101bb
0x209101bc
0x209101bd
0x20910231
0x20910232
0x20910233
0x20910234
0x20910235
0x20910259
0x2091025a
0x2091025b
0x2091025c
0x2091025d
0x2091031d
0x2091031e
0x2091031f
0x20910320
0x20910321
0x20920001
0x20920002
0x20920003
0x20920004
0x20920005
0x20920006
0x20920007
0x20920008
0x20920009
0x2092000a
0x20a20003
0x20a20005
0x20a30036
0x20a30037
0x20a30038
0x20c70003
0x20d0000b
0x30210001
0x30210002
0x3065000a
0x3065000b
0x3065000c
0x30a20004
0x30b10012
0x30b10013
0x30b10015
0x30b10017
0x40520001
0x40530001
0x40b10011
0x40d0000f
0x5065000d
0x5065000e
0x5065000f
0x50650010
0x50650011
0x50650012
0x50650013
0x50650014
0x50650015
0x50650016
0x50650017
0x50650018
0x50b1001a
0x50c70004
0x50c70005
0x50c70006
0x50c70007
@@ -6,6 +6,9 @@
0x10110013 0x10110013
0x10110025 0x10110025
0x10110061 0x10110061
0x101100d7
0x10170001
0x10170002
0x10220001 0x10220001
0x10220002 0x10220002
0x10220003 0x10220003
@@ -47,7 +50,6 @@
0x10510003 0x10510003
0x10520005 0x10520005
0x10530005 0x10530005
0x10530006
0x10640002 0x10640002
0x10640003 0x10640003
0x10640005 0x10640005
@@ -57,30 +59,35 @@
0x10710001 0x10710001
0x10710002 0x10710002
0x10710004 0x10710004
0x10710005
0x10720001 0x10720001
0x10720002 0x10720002
0x10720004 0x10720004
0x10730001 0x10730001
0x10730002 0x10730002
0x10730004 0x10730004
0x10730005
0x10740001 0x10740001
0x10740002 0x10740002
0x10740004 0x10740004
0x10750001 0x10750001
0x10750002 0x10750002
0x10750004 0x10750004
0x10750005
0x10760001 0x10760001
0x10760002 0x10760002
0x10760004 0x10760004
0x10770001 0x10770001
0x10770002 0x10770002
0x10770004 0x10770004
0x10770005
0x10780001 0x10780001
0x10780002 0x10780002
0x10780004 0x10780004
0x10790001 0x10790001
0x10790002 0x10790002
0x10790004 0x10790004
0x10790005
0x107a0001 0x107a0001
0x107a0002 0x107a0002
0x107a0004 0x107a0004
@@ -115,6 +122,7 @@
0x10de0002 0x10de0002
0x10de0003 0x10de0003
0x10de0004 0x10de0004
0x10f60009
0x20030001 0x20030001
0x20030002 0x20030002
0x20030006 0x20030006
@@ -126,6 +134,7 @@
0x2005000c 0x2005000c
0x20050023 0x20050023
0x20050030 0x20050030
0x20050035
0x20090009 0x20090009
0x20110011 0x20110011
0x2011001c 0x2011001c
@@ -259,6 +268,11 @@
0x20910080 0x20910080
0x20910081 0x20910081
0x20910082 0x20910082
0x20910083
0x20910084
0x20910085
0x20910086
0x20910087
0x20910088 0x20910088
0x20910089 0x20910089
0x2091008a 0x2091008a
@@ -539,6 +553,176 @@
0x20910402 0x20910402
0x20910403 0x20910403
0x20910404 0x20910404
0x20910415
0x20910416
0x20910417
0x20910418
0x20910419
0x20910430
0x20910431
0x20910432
0x20910433
0x20910434
0x20910435
0x20910436
0x20910437
0x20910438
0x20910439
0x20910465
0x20910466
0x20910467
0x20910468
0x20910469
0x20910475
0x20910476
0x20910477
0x20910478
0x20910479
0x20910480
0x20910481
0x20910482
0x20910483
0x20910484
0x20910485
0x20910486
0x20910487
0x20910488
0x20910489
0x20910490
0x20910491
0x20910492
0x20910493
0x20910494
0x20910495
0x20910496
0x20910497
0x20910498
0x20910499
0x20910500
0x20910501
0x20910502
0x20910503
0x20910504
0x20910505
0x20910506
0x20910507
0x20910508
0x20910509
0x20910510
0x20910511
0x20910512
0x20910513
0x20910514
0x20910515
0x20910516
0x20910517
0x20910518
0x20910519
0x20910520
0x20910521
0x20910522
0x20910523
0x20910524
0x20910525
0x20910526
0x20910527
0x20910528
0x20910529
0x20910530
0x20910531
0x20910532
0x20910533
0x20910534
0x20910535
0x20910536
0x20910537
0x20910538
0x20910539
0x20910540
0x20910541
0x20910542
0x20910543
0x20910544
0x20910545
0x20910546
0x20910547
0x20910548
0x20910549
0x20910550
0x20910551
0x20910552
0x20910553
0x20910554
0x20910555
0x20910556
0x20910557
0x20910558
0x20910559
0x20910560
0x20910561
0x20910562
0x20910563
0x20910564
0x20910565
0x20910566
0x20910567
0x20910568
0x20910569
0x20910575
0x20910576
0x20910577
0x20910578
0x20910579
0x20910605
0x20910606
0x20910607
0x20910608
0x20910609
0x20910652
0x20910653
0x20910654
0x20910655
0x20910656
0x20910657
0x20910658
0x20910659
0x2091065a
0x2091065b
0x2091065c
0x2091065d
0x2091065e
0x2091065f
0x20910660
0x20910661
0x20910662
0x20910663
0x20910664
0x20910665
0x20910666
0x20910667
0x20910668
0x20910669
0x2091066a
0x20910670
0x20910671
0x20910672
0x20910673
0x20910674
0x2091067f
0x20910680
0x20910681
0x20910682
0x20910683
0x2091069d
0x2091069e
0x2091069f
0x209106a0
0x209106a1
0x209106b6
0x209106b7
0x209106b8
0x209106b9
0x209106ba
0x20920001 0x20920001
0x20920002 0x20920002
0x20920003 0x20920003
@@ -562,6 +746,7 @@
0x20a30054 0x20a30054
0x20a30055 0x20a30055
0x20a30056 0x20a30056
0x20a70001
0x20c70003 0x20c70003
0x30050001 0x30050001
0x30090001 0x30090001
@@ -575,6 +760,7 @@
0x30210001 0x30210001
0x30210002 0x30210002
0x3025003b 0x3025003b
0x30370008
0x3065000a 0x3065000a
0x3065000b 0x3065000b
0x3065000c 0x3065000c
@@ -583,6 +769,8 @@
0x30de0005 0x30de0005
0x30de0006 0x30de0006
0x30de0007 0x30de0007
0x30f6000a
0x30f6000b
0x40030003 0x40030003
0x40030004 0x40030004
0x40030005 0x40030005
+52
View File
@@ -24,6 +24,7 @@
0x10110019 0x10110019
0x10110025 0x10110025
0x10110061 0x10110061
0x101100d7
0x10170001 0x10170001
0x10170002 0x10170002
0x10220001 0x10220001
@@ -140,8 +141,14 @@
0x10a30033 0x10a30033
0x10a30034 0x10a30034
0x10a30035 0x10a30035
0x10b10014
0x10b10016
0x10b10019
0x10c70001 0x10c70001
0x10c70002 0x10c70002
0x10d0000c
0x10d0000d
0x10d0000e
0x10de0002 0x10de0002
0x10de0003 0x10de0003
0x10de0004 0x10de0004
@@ -567,6 +574,11 @@
0x2091031a 0x2091031a
0x2091031b 0x2091031b
0x2091031c 0x2091031c
0x2091031d
0x2091031e
0x2091031f
0x20910320
0x20910321
0x20910336 0x20910336
0x20910337 0x20910337
0x20910338 0x20910338
@@ -632,6 +644,11 @@
0x20910402 0x20910402
0x20910403 0x20910403
0x20910404 0x20910404
0x20910415
0x20910416
0x20910417
0x20910418
0x20910419
0x20910430 0x20910430
0x20910431 0x20910431
0x20910432 0x20910432
@@ -682,11 +699,21 @@
0x20910507 0x20910507
0x20910508 0x20910508
0x20910509 0x20910509
0x20910510
0x20910511
0x20910512
0x20910513
0x20910514
0x20910515 0x20910515
0x20910516 0x20910516
0x20910517 0x20910517
0x20910518 0x20910518
0x20910519 0x20910519
0x20910520
0x20910521
0x20910522
0x20910523
0x20910524
0x20910525 0x20910525
0x20910526 0x20910526
0x20910527 0x20910527
@@ -732,6 +759,11 @@
0x20910567 0x20910567
0x20910568 0x20910568
0x20910569 0x20910569
0x20910575
0x20910576
0x20910577
0x20910578
0x20910579
0x20910590 0x20910590
0x20910591 0x20910591
0x20910592 0x20910592
@@ -797,6 +829,16 @@
0x2091068b 0x2091068b
0x2091068c 0x2091068c
0x2091068d 0x2091068d
0x2091069d
0x2091069e
0x2091069f
0x209106a0
0x209106a1
0x209106b6
0x209106b7
0x209106b8
0x209106b9
0x209106ba
0x20920001 0x20920001
0x20920002 0x20920002
0x20920003 0x20920003
@@ -820,7 +862,9 @@
0x20a30054 0x20a30054
0x20a30055 0x20a30055
0x20a30056 0x20a30056
0x20a70001
0x20c70003 0x20c70003
0x20d0000b
0x30050001 0x30050001
0x30060007 0x30060007
0x3006000a 0x3006000a
@@ -842,11 +886,16 @@
0x30210001 0x30210001
0x30210002 0x30210002
0x3025003b 0x3025003b
0x30370008
0x3065000a 0x3065000a
0x3065000b 0x3065000b
0x3065000c 0x3065000c
0x30930033 0x30930033
0x30a20004 0x30a20004
0x30b10012
0x30b10013
0x30b10015
0x30b10017
0x30de0005 0x30de0005
0x30de0006 0x30de0006
0x30de0007 0x30de0007
@@ -902,6 +951,8 @@
0x40240053 0x40240053
0x40520001 0x40520001
0x40530001 0x40530001
0x40b10011
0x40d0000f
0x40de0008 0x40de0008
0x5005002a 0x5005002a
0x5005002b 0x5005002b
@@ -922,6 +973,7 @@
0x50650016 0x50650016
0x50650017 0x50650017
0x50650018 0x50650018
0x50b1001a
0x50c70004 0x50c70004
0x50c70005 0x50c70005
0x50c70006 0x50c70006
+47
View File
@@ -26,10 +26,15 @@ UBX_NAV_VELECEF_data_t KEYWORD1
UBX_NAV_VELNED_data_t KEYWORD1 UBX_NAV_VELNED_data_t KEYWORD1
UBX_NAV_HPPOSECEF_data_t KEYWORD1 UBX_NAV_HPPOSECEF_data_t KEYWORD1
UBX_NAV_HPPOSLLH_data_t KEYWORD1 UBX_NAV_HPPOSLLH_data_t KEYWORD1
UBX_NAV_PVAT_data_t KEYWORD1
UBX_NAV_CLOCK_data_t KEYWORD1 UBX_NAV_CLOCK_data_t KEYWORD1
UBX_NAV_SAT_data_t KEYWORD1
UBX_NAV_RELPOSNED_data_t KEYWORD1 UBX_NAV_RELPOSNED_data_t KEYWORD1
UBX_NAV_TIMELS_data_t KEYWORD1 UBX_NAV_TIMELS_data_t KEYWORD1
UBX_NAV_AOPSTATUS_data_t KEYWORD1
UBX_RXM_PMP_data_t KEYWORD1
UBX_RXM_PMP_message_data_t KEYWORD1
UBX_RXM_SFRBX_data_t KEYWORD1 UBX_RXM_SFRBX_data_t KEYWORD1
UBX_RXM_RAWX_data_t KEYWORD1 UBX_RXM_RAWX_data_t KEYWORD1
@@ -45,6 +50,8 @@ UBX_HNR_PVT_data_t KEYWORD1
UBX_HNR_ATT_data_t KEYWORD1 UBX_HNR_ATT_data_t KEYWORD1
UBX_HNR_INS_data_t KEYWORD1 UBX_HNR_INS_data_t KEYWORD1
NMEA_GGA_data_t KEYWORD1
####################################### #######################################
# Methods and Functions (KEYWORD2) # Methods and Functions (KEYWORD2)
####################################### #######################################
@@ -118,6 +125,7 @@ setUART2Output KEYWORD2
setUSBOutput KEYWORD2 setUSBOutput KEYWORD2
setSPIOutput KEYWORD2 setSPIOutput KEYWORD2
setNMEAOutputPort KEYWORD2 setNMEAOutputPort KEYWORD2
setOutputPort KEYWORD2
factoryReset KEYWORD2 factoryReset KEYWORD2
hardReset KEYWORD2 hardReset KEYWORD2
@@ -178,29 +186,38 @@ setAckAiding KEYWORD2
getAopCfg KEYWORD2 getAopCfg KEYWORD2
setAopCfg KEYWORD2 setAopCfg KEYWORD2
setDynamicSPARTNKey KEYWORD2
setDynamicSPARTNKeys KEYWORD2
createKey KEYWORD2 createKey KEYWORD2
getVal KEYWORD2 getVal KEYWORD2
getVal8 KEYWORD2 getVal8 KEYWORD2
getVal16 KEYWORD2 getVal16 KEYWORD2
getVal32 KEYWORD2 getVal32 KEYWORD2
getVal64 KEYWORD2
setVal KEYWORD2 setVal KEYWORD2
setVal8 KEYWORD2 setVal8 KEYWORD2
setVal16 KEYWORD2 setVal16 KEYWORD2
setVal32 KEYWORD2 setVal32 KEYWORD2
setVal64 KEYWORD2
newCfgValset8 KEYWORD2 newCfgValset8 KEYWORD2
newCfgValset16 KEYWORD2 newCfgValset16 KEYWORD2
newCfgValset32 KEYWORD2 newCfgValset32 KEYWORD2
newCfgValset64 KEYWORD2
addCfgValset8 KEYWORD2 addCfgValset8 KEYWORD2
addCfgValset16 KEYWORD2 addCfgValset16 KEYWORD2
addCfgValset32 KEYWORD2 addCfgValset32 KEYWORD2
addCfgValset64 KEYWORD2
sendCfgValset8 KEYWORD2 sendCfgValset8 KEYWORD2
sendCfgValset16 KEYWORD2 sendCfgValset16 KEYWORD2
sendCfgValset32 KEYWORD2 sendCfgValset32 KEYWORD2
sendCfgValset64 KEYWORD2
getNAVPOSECEF KEYWORD2 getNAVPOSECEF KEYWORD2
setAutoNAVPOSECEF KEYWORD2 setAutoNAVPOSECEF KEYWORD2
setAutoNAVPOSECEFrate KEYWORD2 setAutoNAVPOSECEFrate KEYWORD2
setAutoNAVPOSECEFcallback KEYWORD2 setAutoNAVPOSECEFcallback KEYWORD2
setAutoNAVPOSECEFcallbackPtr KEYWORD2
assumeAutoNAVPOSECEF KEYWORD2 assumeAutoNAVPOSECEF KEYWORD2
initPacketUBXNAVPOSECEF KEYWORD2 initPacketUBXNAVPOSECEF KEYWORD2
flushNAVPOSECEF KEYWORD2 flushNAVPOSECEF KEYWORD2
@@ -210,6 +227,7 @@ getNAVSTATUS KEYWORD2
setAutoNAVSTATUS KEYWORD2 setAutoNAVSTATUS KEYWORD2
setAutoNAVSTATUSrate KEYWORD2 setAutoNAVSTATUSrate KEYWORD2
setAutoNAVSTATUScallback KEYWORD2 setAutoNAVSTATUScallback KEYWORD2
setAutoNAVSTATUScallbackPtr KEYWORD2
assumeAutoNAVSTATUS KEYWORD2 assumeAutoNAVSTATUS KEYWORD2
initPacketUBXNAVSTATUS KEYWORD2 initPacketUBXNAVSTATUS KEYWORD2
flushNAVSTATUS KEYWORD2 flushNAVSTATUS KEYWORD2
@@ -219,6 +237,7 @@ getDOP KEYWORD2
setAutoDOP KEYWORD2 setAutoDOP KEYWORD2
setAutoDOPrate KEYWORD2 setAutoDOPrate KEYWORD2
setAutoDOPcallback KEYWORD2 setAutoDOPcallback KEYWORD2
setAutoDOPcallbackPtr KEYWORD2
assumeAutoDOP KEYWORD2 assumeAutoDOP KEYWORD2
initPacketUBXNAVDOP KEYWORD2 initPacketUBXNAVDOP KEYWORD2
flushDOP KEYWORD2 flushDOP KEYWORD2
@@ -229,6 +248,7 @@ getNAVATT KEYWORD2
setAutoNAVATT KEYWORD2 setAutoNAVATT KEYWORD2
setAutoNAVATTrate KEYWORD2 setAutoNAVATTrate KEYWORD2
setAutoNAVATTcallback KEYWORD2 setAutoNAVATTcallback KEYWORD2
setAutoNAVATTcallbackPtr KEYWORD2
assumeAutoNAVATT KEYWORD2 assumeAutoNAVATT KEYWORD2
initPacketUBXNAVATT KEYWORD2 initPacketUBXNAVATT KEYWORD2
flushNAVATT KEYWORD2 flushNAVATT KEYWORD2
@@ -238,6 +258,7 @@ getPVT KEYWORD2
setAutoPVT KEYWORD2 setAutoPVT KEYWORD2
setAutoPVTrate KEYWORD2 setAutoPVTrate KEYWORD2
setAutoPVTcallback KEYWORD2 setAutoPVTcallback KEYWORD2
setAutoPVTcallbackPtr KEYWORD2
assumeAutoPVT KEYWORD2 assumeAutoPVT KEYWORD2
initPacketUBXNAVPVT KEYWORD2 initPacketUBXNAVPVT KEYWORD2
flushPVT KEYWORD2 flushPVT KEYWORD2
@@ -247,6 +268,7 @@ getNAVODO KEYWORD2
setAutoNAVODO KEYWORD2 setAutoNAVODO KEYWORD2
setAutoNAVODOrate KEYWORD2 setAutoNAVODOrate KEYWORD2
setAutoNAVODOcallback KEYWORD2 setAutoNAVODOcallback KEYWORD2
setAutoNAVODOcallbackPtr KEYWORD2
assumeAutoNAVODO KEYWORD2 assumeAutoNAVODO KEYWORD2
initPacketUBXNAVODO KEYWORD2 initPacketUBXNAVODO KEYWORD2
flushNAVODO KEYWORD2 flushNAVODO KEYWORD2
@@ -256,6 +278,7 @@ getNAVVELECEF KEYWORD2
setAutoNAVVELECEF KEYWORD2 setAutoNAVVELECEF KEYWORD2
setAutoNAVVELECEFrate KEYWORD2 setAutoNAVVELECEFrate KEYWORD2
setAutoNAVVELECEFcallback KEYWORD2 setAutoNAVVELECEFcallback KEYWORD2
setAutoNAVVELECEFcallbackPtr KEYWORD2
assumeAutoNAVVELECEF KEYWORD2 assumeAutoNAVVELECEF KEYWORD2
initPacketUBXNAVVELECEF KEYWORD2 initPacketUBXNAVVELECEF KEYWORD2
flushNAVVELECEF KEYWORD2 flushNAVVELECEF KEYWORD2
@@ -265,6 +288,7 @@ getNAVVELNED KEYWORD2
setAutoNAVVELNED KEYWORD2 setAutoNAVVELNED KEYWORD2
setAutoNAVVELNEDrate KEYWORD2 setAutoNAVVELNEDrate KEYWORD2
setAutoNAVVELNEDcallback KEYWORD2 setAutoNAVVELNEDcallback KEYWORD2
setAutoNAVVELNEDcallbackPtr KEYWORD2
assumeAutoNAVVELNED KEYWORD2 assumeAutoNAVVELNED KEYWORD2
initPacketUBXNAVVELNED KEYWORD2 initPacketUBXNAVVELNED KEYWORD2
flushNAVVELNED KEYWORD2 flushNAVVELNED KEYWORD2
@@ -274,6 +298,7 @@ getNAVHPPOSECEF KEYWORD2
setAutoNAVHPPOSECEF KEYWORD2 setAutoNAVHPPOSECEF KEYWORD2
setAutoNAVHPPOSECEFrate KEYWORD2 setAutoNAVHPPOSECEFrate KEYWORD2
setAutoNAVHPPOSECEFcallback KEYWORD2 setAutoNAVHPPOSECEFcallback KEYWORD2
setAutoNAVHPPOSECEFcallbackPtr KEYWORD2
assumeAutoNAVHPPOSECEF KEYWORD2 assumeAutoNAVHPPOSECEF KEYWORD2
initPacketUBXNAVHPPOSECEF KEYWORD2 initPacketUBXNAVHPPOSECEF KEYWORD2
flushNAVHPPOSECEF KEYWORD2 flushNAVHPPOSECEF KEYWORD2
@@ -283,6 +308,7 @@ getHPPOSLLH KEYWORD2
setAutoHPPOSLLH KEYWORD2 setAutoHPPOSLLH KEYWORD2
setAutoHPPOSLLHrate KEYWORD2 setAutoHPPOSLLHrate KEYWORD2
setAutoHPPOSLLHcallback KEYWORD2 setAutoHPPOSLLHcallback KEYWORD2
setAutoHPPOSLLHcallbackPtr KEYWORD2
assumeAutoHPPOSLLH KEYWORD2 assumeAutoHPPOSLLH KEYWORD2
initPacketUBXNAVHPPOSLLH KEYWORD2 initPacketUBXNAVHPPOSLLH KEYWORD2
flushHPPOSLLH KEYWORD2 flushHPPOSLLH KEYWORD2
@@ -293,6 +319,7 @@ setAutoNAVPVAT KEYWORD2
setAutoNAVPVAT KEYWORD2 setAutoNAVPVAT KEYWORD2
setAutoNAVPVATrate KEYWORD2 setAutoNAVPVATrate KEYWORD2
setAutoNAVPVATcallback KEYWORD2 setAutoNAVPVATcallback KEYWORD2
setAutoNAVPVATcallbackPtr KEYWORD2
assumeAutoNAVPVAT KEYWORD2 assumeAutoNAVPVAT KEYWORD2
flushNAVPVAT KEYWORD2 flushNAVPVAT KEYWORD2
logNAVPVAT KEYWORD2 logNAVPVAT KEYWORD2
@@ -301,6 +328,7 @@ getNAVCLOCK KEYWORD2
setAutoNAVCLOCK KEYWORD2 setAutoNAVCLOCK KEYWORD2
setAutoNAVCLOCKrate KEYWORD2 setAutoNAVCLOCKrate KEYWORD2
setAutoNAVCLOCKcallback KEYWORD2 setAutoNAVCLOCKcallback KEYWORD2
setAutoNAVCLOCKcallbackPtr KEYWORD2
assumeAutoNAVCLOCK KEYWORD2 assumeAutoNAVCLOCK KEYWORD2
initPacketUBXNAVCLOCK KEYWORD2 initPacketUBXNAVCLOCK KEYWORD2
flushNAVCLOCK KEYWORD2 flushNAVCLOCK KEYWORD2
@@ -318,6 +346,7 @@ getNAVSAT KEYWORD2
setAutoNAVSAT KEYWORD2 setAutoNAVSAT KEYWORD2
setAutoNAVSATrate KEYWORD2 setAutoNAVSATrate KEYWORD2
setAutoNAVSATcallback KEYWORD2 setAutoNAVSATcallback KEYWORD2
setAutoNAVSATcallbackPtr KEYWORD2
assumeAutoNAVSAT KEYWORD2 assumeAutoNAVSAT KEYWORD2
initPacketUBXNAVSAT KEYWORD2 initPacketUBXNAVSAT KEYWORD2
flushNAVSAT KEYWORD2 flushNAVSAT KEYWORD2
@@ -327,6 +356,7 @@ getRELPOSNED KEYWORD2
setAutoRELPOSNED KEYWORD2 setAutoRELPOSNED KEYWORD2
setAutoRELPOSNEDrate KEYWORD2 setAutoRELPOSNEDrate KEYWORD2
setAutoRELPOSNEDcallback KEYWORD2 setAutoRELPOSNEDcallback KEYWORD2
setAutoRELPOSNEDcallbackPtr KEYWORD2
assumeAutoRELPOSNED KEYWORD2 assumeAutoRELPOSNED KEYWORD2
initPacketUBXNAVRELPOSNED KEYWORD2 initPacketUBXNAVRELPOSNED KEYWORD2
flushNAVRELPOSNED KEYWORD2 flushNAVRELPOSNED KEYWORD2
@@ -336,15 +366,20 @@ getAOPSTATUS KEYWORD2
setAutoAOPSTATUS KEYWORD2 setAutoAOPSTATUS KEYWORD2
setAutoAOPSTATUSrate KEYWORD2 setAutoAOPSTATUSrate KEYWORD2
setAutoAOPSTATUScallback KEYWORD2 setAutoAOPSTATUScallback KEYWORD2
setAutoAOPSTATUScallbackPtr KEYWORD2
assumeAutoAOPSTATUS KEYWORD2 assumeAutoAOPSTATUS KEYWORD2
initPacketUBXAOPSTATUS KEYWORD2 initPacketUBXAOPSTATUS KEYWORD2
flushAOPSTATUS KEYWORD2 flushAOPSTATUS KEYWORD2
logAOPSTATUS KEYWORD2 logAOPSTATUS KEYWORD2
setRXMPMPcallbackPtr KEYWORD2
setRXMPMPmessageCallbackPtr KEYWORD2
getRXMSFRBX KEYWORD2 getRXMSFRBX KEYWORD2
setAutoRXMSFRBX KEYWORD2 setAutoRXMSFRBX KEYWORD2
setAutoRXMSFRBXrate KEYWORD2 setAutoRXMSFRBXrate KEYWORD2
setAutoRXMSFRBXcallback KEYWORD2 setAutoRXMSFRBXcallback KEYWORD2
setAutoRXMSFRBXcallbackPtr KEYWORD2
assumeAutoRXMSFRBX KEYWORD2 assumeAutoRXMSFRBX KEYWORD2
initPacketUBXRXMSFRBX KEYWORD2 initPacketUBXRXMSFRBX KEYWORD2
flushRXMSFRBX KEYWORD2 flushRXMSFRBX KEYWORD2
@@ -354,6 +389,7 @@ getRXMRAWX KEYWORD2
setAutoRXMRAWX KEYWORD2 setAutoRXMRAWX KEYWORD2
setAutoRXMRAWXrate KEYWORD2 setAutoRXMRAWXrate KEYWORD2
setAutoRXMRAWXcallback KEYWORD2 setAutoRXMRAWXcallback KEYWORD2
setAutoRXMRAWXcallbackPtr KEYWORD2
assumeAutoRXMRAWX KEYWORD2 assumeAutoRXMRAWX KEYWORD2
initPacketUBXRXMRAWX KEYWORD2 initPacketUBXRXMRAWX KEYWORD2
flushRXMRAWX KEYWORD2 flushRXMRAWX KEYWORD2
@@ -363,6 +399,7 @@ getTIMTM2 KEYWORD2
setAutoTIMTM2 KEYWORD2 setAutoTIMTM2 KEYWORD2
setAutoTIMTM2rate KEYWORD2 setAutoTIMTM2rate KEYWORD2
setAutoTIMTM2callback KEYWORD2 setAutoTIMTM2callback KEYWORD2
setAutoTIMTM2callbackPtr KEYWORD2
assumeAutoTIMTM2 KEYWORD2 assumeAutoTIMTM2 KEYWORD2
initPacketUBXTIMTM2 KEYWORD2 initPacketUBXTIMTM2 KEYWORD2
flushTIMTM2 KEYWORD2 flushTIMTM2 KEYWORD2
@@ -373,6 +410,7 @@ getESFALG KEYWORD2
setAutoESFALG KEYWORD2 setAutoESFALG KEYWORD2
setAutoESFALGrate KEYWORD2 setAutoESFALGrate KEYWORD2
setAutoESFALGcallback KEYWORD2 setAutoESFALGcallback KEYWORD2
setAutoESFALGcallbackPtr KEYWORD2
assumeAutoESFALG KEYWORD2 assumeAutoESFALG KEYWORD2
initPacketUBXESFALG KEYWORD2 initPacketUBXESFALG KEYWORD2
flushESFALG KEYWORD2 flushESFALG KEYWORD2
@@ -383,6 +421,7 @@ getESFSTATUS KEYWORD2
setAutoESFSTATUS KEYWORD2 setAutoESFSTATUS KEYWORD2
setAutoESFSTATUSrate KEYWORD2 setAutoESFSTATUSrate KEYWORD2
setAutoESFSTATUScallback KEYWORD2 setAutoESFSTATUScallback KEYWORD2
setAutoESFSTATUScallbackPtr KEYWORD2
assumeAutoESFSTATUS KEYWORD2 assumeAutoESFSTATUS KEYWORD2
initPacketUBXESFSTATUS KEYWORD2 initPacketUBXESFSTATUS KEYWORD2
flushESFSTATUS KEYWORD2 flushESFSTATUS KEYWORD2
@@ -393,6 +432,7 @@ getESFINS KEYWORD2
setAutoESFINS KEYWORD2 setAutoESFINS KEYWORD2
setAutoESFINSrate KEYWORD2 setAutoESFINSrate KEYWORD2
setAutoESFINScallback KEYWORD2 setAutoESFINScallback KEYWORD2
setAutoESFINScallbackPtr KEYWORD2
assumeAutoESFINS KEYWORD2 assumeAutoESFINS KEYWORD2
initPacketUBXESFINS KEYWORD2 initPacketUBXESFINS KEYWORD2
flushESFINS KEYWORD2 flushESFINS KEYWORD2
@@ -403,6 +443,7 @@ getESFMEAS KEYWORD2
setAutoESFMEAS KEYWORD2 setAutoESFMEAS KEYWORD2
setAutoESFMEASrate KEYWORD2 setAutoESFMEASrate KEYWORD2
setAutoESFMEAScallback KEYWORD2 setAutoESFMEAScallback KEYWORD2
setAutoESFMEAScallbackPtr KEYWORD2
assumeAutoESFMEAS KEYWORD2 assumeAutoESFMEAS KEYWORD2
initPacketUBXESFMEAS KEYWORD2 initPacketUBXESFMEAS KEYWORD2
flushESFMEAS KEYWORD2 flushESFMEAS KEYWORD2
@@ -413,6 +454,7 @@ getESFRAW KEYWORD2
setAutoESFRAW KEYWORD2 setAutoESFRAW KEYWORD2
setAutoESFRAWrate KEYWORD2 setAutoESFRAWrate KEYWORD2
setAutoESFRAWcallback KEYWORD2 setAutoESFRAWcallback KEYWORD2
setAutoESFRAWcallbackPtr KEYWORD2
assumeAutoESFRAW KEYWORD2 assumeAutoESFRAW KEYWORD2
initPacketUBXESFRAW KEYWORD2 initPacketUBXESFRAW KEYWORD2
flushESFRAW KEYWORD2 flushESFRAW KEYWORD2
@@ -423,6 +465,7 @@ getHNRATT KEYWORD2
setAutoHNRATT KEYWORD2 setAutoHNRATT KEYWORD2
setAutoHNRATTrate KEYWORD2 setAutoHNRATTrate KEYWORD2
setAutoHNRATTcallback KEYWORD2 setAutoHNRATTcallback KEYWORD2
setAutoHNRATTcallbackPtr KEYWORD2
assumeAutoHNRATT KEYWORD2 assumeAutoHNRATT KEYWORD2
initPacketUBXHNRATT KEYWORD2 initPacketUBXHNRATT KEYWORD2
flushHNRATT KEYWORD2 flushHNRATT KEYWORD2
@@ -433,6 +476,7 @@ getHNRINS KEYWORD2
setAutoHNRINS KEYWORD2 setAutoHNRINS KEYWORD2
setAutoHNRINSrate KEYWORD2 setAutoHNRINSrate KEYWORD2
setAutoHNRINScallback KEYWORD2 setAutoHNRINScallback KEYWORD2
setAutoHNRINScallbackPtr KEYWORD2
assumeAutoHNRINS KEYWORD2 assumeAutoHNRINS KEYWORD2
initPacketUBXHNRINS KEYWORD2 initPacketUBXHNRINS KEYWORD2
flushHNRINS KEYWORD2 flushHNRINS KEYWORD2
@@ -442,6 +486,7 @@ getHNRPVT KEYWORD2
setAutoHNRPVT KEYWORD2 setAutoHNRPVT KEYWORD2
setAutoHNRPVTrate KEYWORD2 setAutoHNRPVTrate KEYWORD2
setAutoHNRPVTcallback KEYWORD2 setAutoHNRPVTcallback KEYWORD2
setAutoHNRPVTcallbackPtr KEYWORD2
assumeAutoHNRPVT KEYWORD2 assumeAutoHNRPVT KEYWORD2
initPacketUBXHNRPVT KEYWORD2 initPacketUBXHNRPVT KEYWORD2
flushHNRPVT KEYWORD2 flushHNRPVT KEYWORD2
@@ -565,8 +610,10 @@ setHighPrecisionMode KEYWORD2
getLatestNMEAGPGGA KEYWORD2 getLatestNMEAGPGGA KEYWORD2
setNMEAGPGGAcallback KEYWORD2 setNMEAGPGGAcallback KEYWORD2
setNMEAGPGGAcallbackPtr KEYWORD2
getLatestNMEAGNGGA KEYWORD2 getLatestNMEAGNGGA KEYWORD2
setNMEAGNGGAcallback KEYWORD2 setNMEAGNGGAcallback KEYWORD2
setNMEAGNGGAcallbackPtr KEYWORD2
extractLong KEYWORD2 extractLong KEYWORD2
extractSignedLong KEYWORD2 extractSignedLong KEYWORD2
+1 -1
View File
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS Arduino Library name=SparkFun u-blox GNSS Arduino Library
version=2.2.0 version=2.2.1
author=SparkFun Electronics <techsupport@sparkfun.com> author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com> maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/> sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1072 -1004
View File
File diff suppressed because it is too large Load Diff
+568 -452
View File
File diff suppressed because it is too large Load Diff