Skip to content

v2.2.1 #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4cad56b
Add config keys for NEO-D9S
PaulZC Feb 4, 2022
eba8063
Add more support for UBX-RXM-PMP
PaulZC Feb 4, 2022
9e13794
Adding callback pointers for all auto messages
PaulZC Feb 5, 2022
47348ab
Finish adding callback pointers for all auto messages
PaulZC Feb 5, 2022
1ada3d3
Update callback examples to use new callback pointers
PaulZC Feb 5, 2022
0bf94be
Update Example2_NMEA_GGA_Callbacks.ino
PaulZC Feb 5, 2022
5a4ac25
Update data logging examples 1-3 to use the new callback pointers
PaulZC Feb 6, 2022
fae14c1
Update data logging examples 4-6
PaulZC Feb 6, 2022
7395c25
Update AssistNow Autonomous examples to use callback pointers
PaulZC Feb 6, 2022
9a486f9
Update ZED-F9P callback examples
PaulZC Feb 6, 2022
e59b7b5
Correct typos and add library manager helper links in Example18_Point…
PaulZC Feb 6, 2022
fcf00c7
Add extra config keys for the NEO-D9S
PaulZC Feb 7, 2022
df4fb4c
Add 64-bit setval and getval functions
PaulZC Feb 7, 2022
088408e
Remove setAutoRXMPMPcallback. setAutoRXMPMPcallbackPtr is the way to …
PaulZC Feb 7, 2022
bfe1403
Create Example19_LBand_Corrections_with_NEO-D9S.ino
PaulZC Feb 7, 2022
eaccb5f
Update README - include PointPerfect and NEO-D9S
PaulZC Feb 7, 2022
134299f
Add extra config keys for F9-HPG-1.30
PaulZC Feb 10, 2022
dba2cff
Update u-blox_config_keys_sorted.txt
PaulZC Feb 10, 2022
1d7621d
Add setDynamicSPARTNKey
PaulZC Feb 10, 2022
b70cb1c
VSC whitespace changes... Sorry!
PaulZC Feb 11, 2022
213d29c
Add setDynamicSPARTNKeys. Update Example19
PaulZC Feb 11, 2022
1aa043c
Update Example19. Add setRXMPMPmessageCallbackPtr. Add const char ver…
PaulZC Feb 14, 2022
286670c
Update SparkFun_u-blox_GNSS_Arduino_Library.h
mazgch Feb 14, 2022
505bffd
Update SparkFun_u-blox_GNSS_Arduino_Library.cpp
mazgch Feb 14, 2022
3000efb
Update Example19_LBand_Corrections_with_NEO-D9S.ino
mazgch Feb 14, 2022
6ea6730
Update SparkFun_u-blox_GNSS_Arduino_Library.cpp
mazgch Feb 14, 2022
b4e251c
Set packetUBXRXMPMPmessage callbackCopyValid to true
PaulZC Feb 14, 2022
a9aa143
Merge branch 'release_candidate' into release_candidate
PaulZC Feb 14, 2022
2e6f6ce
Merge pull request #110 from mazgch/release_candidate
PaulZC Feb 14, 2022
29c0f0c
Add setNMEAOutputPort to keywords.txt
PaulZC Feb 14, 2022
daf3896
v2.2.1
PaulZC Feb 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Adding_New_Messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

#### 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.

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.

#### 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.

#### 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.

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

## 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!

v2.2 also includes two new functions useful for correction services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ 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.print(F("UBX-NAV-SAT contains data for "));
Serial.print(ubxDataStruct.header.numSvs);
if (ubxDataStruct.header.numSvs == 1)
Serial.print(ubxDataStruct->header.numSvs);
if (ubxDataStruct->header.numSvs == 1)
Serial.println(F(" SV"));
else
Serial.println(F(" SVs"));

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
}

Expand All @@ -78,12 +78,12 @@ void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct)
// | / _____ 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.print(F("AOPSTATUS status is "));
Serial.println(ubxDataStruct.status);
Serial.println(ubxDataStruct->status);
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Expand All @@ -95,27 +95,27 @@ void printAOPstatus(UBX_NAV_AOPSTATUS_data_t ubxDataStruct)
// | / _____ 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

Serial.println();

long latitude = ubxDataStruct.lat; // Print the latitude
long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F("Lat: "));
Serial.print(latitude);

long longitude = ubxDataStruct.lon; // Print the longitude
long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: "));
Serial.print(longitude);
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(altitude);
Serial.print(F(" (mm)"));

byte fixType = ubxDataStruct.fixType; // Print the fix type
byte fixType = ubxDataStruct->fixType; // Print the fix type
Serial.print(F(" Fix: "));
if(fixType == 0) Serial.print(F("No fix"));
else if(fixType == 1) Serial.print(F("Dead reckoning"));
Expand Down Expand Up @@ -171,9 +171,9 @@ void setup()

myGNSS.setNavigationFrequency(1); //Produce one solution per second

myGNSS.setAutoNAVSATcallback(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallback(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus
myGNSS.setAutoPVTcallback(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
myGNSS.setAutoNAVSATcallbackPtr(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallbackPtr(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus
myGNSS.setAutoPVTcallbackPtr(&printPVTdata); // Enable automatic NAV PVT messages with callback to printPVTdata
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ 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.print(F("UBX-NAV-SAT contains data for "));
Serial.print(ubxDataStruct.header.numSvs);
if (ubxDataStruct.header.numSvs == 1)
Serial.print(ubxDataStruct->header.numSvs);
if (ubxDataStruct->header.numSvs == 1)
Serial.println(F(" SV"));
else
Serial.println(F(" SVs"));

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
}

Expand All @@ -71,12 +71,12 @@ void printSATdata(UBX_NAV_SAT_data_t ubxDataStruct)
// | / _____ 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.print(F("AOPSTATUS status is "));
Serial.println(ubxDataStruct.status);
Serial.println(ubxDataStruct->status);
}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Expand Down Expand Up @@ -126,8 +126,8 @@ void setup()

myGNSS.setNavigationFrequency(1); //Produce one solution per second

myGNSS.setAutoNAVSATcallback(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallback(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus
myGNSS.setAutoNAVSATcallbackPtr(&printSATdata); // Enable automatic NAV SAT messages with callback to printSATdata
myGNSS.setAutoAOPSTATUScallbackPtr(&printAOPstatus); // Enable automatic NAV AOPSTATUS messages with callback to printAOPstatus

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Keep displaying NAV SAT and AOPSTATUS until the user presses a key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ 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(nmeaData.length);
Serial.print(nmeaData->length);
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
Expand All @@ -54,12 +54,12 @@ void printGPGGA(NMEA_GGA_data_t nmeaData)
// | / _____ 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(nmeaData.length);
Serial.print(nmeaData->length);
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()
Expand Down Expand Up @@ -101,10 +101,10 @@ void setup()
//myGNSS.setNMEAOutputPort(Serial); // Uncomment this line to echo all NMEA data to Serial for debugging

// Set up the callback for GPGGA
myGNSS.setNMEAGPGGAcallback(&printGPGGA);
myGNSS.setNMEAGPGGAcallbackPtr(&printGPGGA);

// Set up the callback for GNGGA
myGNSS.setNMEAGNGGAcallback(&printGNGGA);
myGNSS.setNMEAGNGGAcallbackPtr(&printGNGGA);
}

void loop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,38 +33,38 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ 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.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
Serial.print(hms);
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
Serial.print(hms);
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
Serial.print(hms);
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 < 10) Serial.print(F("0"));
Serial.print(millisecs);

long latitude = ubxDataStruct.lat; // Print the latitude
long latitude = ubxDataStruct->lat; // Print the latitude
Serial.print(F(" Lat: "));
Serial.print(latitude);

long longitude = ubxDataStruct.lon; // Print the longitude
long longitude = ubxDataStruct->lon; // Print the longitude
Serial.print(F(" Long: "));
Serial.print(longitude);
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(altitude);
Serial.println(F(" (mm)"));
Expand All @@ -91,7 +91,7 @@ void setup()

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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ SFE_UBLOX_GNSS myGNSS;
// | / _____ 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.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(F(" (ms)"));

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(F(" (m)"));

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.println(F(" (m)"));
}
Expand Down Expand Up @@ -76,7 +76,7 @@ void setup()

//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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
// | | /
// | | |
void printTIMTM2data(UBX_TIM_TM2_data_t ubxDataStruct)
void printTIMTM2data(UBX_TIM_TM2_data_t *ubxDataStruct)
{
Serial.println();

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(ubxDataStruct.flags.bits.newRisingEdge);
Serial.print(ubxDataStruct->flags.bits.newRisingEdge);

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(ubxDataStruct.towMsR);
Serial.print(ubxDataStruct->towMsR);

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(ubxDataStruct.towMsF);
Serial.print(ubxDataStruct->towMsF);

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
}
Expand All @@ -97,7 +97,7 @@ void setup()

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()
Expand Down
Loading