Skip to content

v2.2.24 #200

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 5 commits into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
Open the serial monitor at 115200 baud to see the output

After calibrating the module and securing it to your vehicle such that it's
stable within 2 degrees, and the board is oriented correctly with regards to
the vehicle's frame, you can now read the vehicle's "attitude". The attitude
includes the vehicle's heading, pitch, and roll. You can also check the
accuracy of those readings.
getEsfAlignment (UBX-ESF-ALG) reports the status and alignment angles of the IMU within the vehicle.
These define the rotation of the IMU frame within the vehicle (installation frame) - not the heading
of the vehicle itself. The vehicle attitude solution is reported separately by getNAVATT (UBX-NAV-ATT).

*/

Expand All @@ -45,6 +43,8 @@ void setup()

myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)

myGNSS.setESFAutoAlignment(true); //Enable Automatic IMU-mount Alignment

if (myGNSS.getEsfInfo()){

Serial.print(F("Fusion Mode: "));
Expand All @@ -63,20 +63,32 @@ void setup()
void loop()
{
// ESF data is produced at the navigation rate, so by default we'll get fresh data once per second
if (myGNSS.getEsfAlignment()) // Poll new ESF ALG data
if (myGNSS.getEsfAlignment()) // Poll new ESF ALG data
{
Serial.print(F("Status: "));
Serial.print(myGNSS.packetUBXESFALG->data.flags.bits.status);
Serial.print(F("IMU-Mount Alignment: On/Off: "));
Serial.print(myGNSS.packetUBXESFALG->data.flags.bits.autoMntAlgOn);
Serial.print(F(" Status: "));
Serial.print(myGNSS.packetUBXESFALG->data.flags.bits.status);
Serial.print(F(" Roll: "));
Serial.print(myGNSS.getESFroll(), 2); // Use the helper function to get the roll in degrees
Serial.print(F(" Pitch: "));
Serial.print(myGNSS.getESFpitch(), 2); // Use the helper function to get the pitch in degrees
Serial.print(F(" Heading: "));
Serial.print(myGNSS.getESFyaw(), 2); // Use the helper function to get the yaw in degrees
Serial.print(F(" Errors: "));
Serial.print(myGNSS.packetUBXESFALG->data.error.bits.tiltAlgError);
Serial.print(myGNSS.packetUBXESFALG->data.error.bits.yawAlgError);
Serial.println(myGNSS.packetUBXESFALG->data.error.bits.angleError);
Serial.print(F(" Pitch: "));
Serial.print(myGNSS.getESFpitch(), 2); // Use the helper function to get the pitch in degrees
Serial.print(F(" Yaw: "));
Serial.print(myGNSS.getESFyaw(), 2); // Use the helper function to get the yaw in degrees
Serial.print(F(" Errors: "));
Serial.print(myGNSS.packetUBXESFALG->data.error.bits.tiltAlgError);
Serial.print(myGNSS.packetUBXESFALG->data.error.bits.yawAlgError);
Serial.println(myGNSS.packetUBXESFALG->data.error.bits.angleError);
}

if (myGNSS.getNAVATT()) // Poll new NAV ATT data
{
Serial.print(F("Vehicle Attitude: Roll: "));
Serial.print(myGNSS.getATTroll(), 2); // Use the helper function to get the roll in degrees
Serial.print(F(" Pitch: "));
Serial.print(myGNSS.getATTpitch(), 2); // Use the helper function to get the pitch in degrees
Serial.print(F(" Heading: "));
Serial.println(myGNSS.getATTheading(), 2); // Use the helper function to get the heading in degrees
}

delay(250);
Expand Down
8 changes: 4 additions & 4 deletions examples/Example30_NEO-D9S/Example30_NEO-D9S.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ void printRXMPMP(UBX_RXM_PMP_data_t *pmpData)
Serial.print(F("numBytesUserData : "));
Serial.println(pmpData->numBytesUserData);

Serial.print(F("serviceIdentifier: "));
Serial.println(pmpData->serviceIdentifier);
Serial.print(F("serviceIdentifier: 0x"));
Serial.println(pmpData->serviceIdentifier, HEX);

Serial.print(F("uniqueWordBitErrors: "));
Serial.println(pmpData->uniqueWordBitErrors);

Serial.print(F("fecBits: "));
Serial.println(pmpData->fecBits);

Serial.print(F("ebno: "));
Serial.println(pmpData->ebno);
Serial.print(F("ebno (dB): "));
Serial.println((double)pmpData->ebno / 8, 3); //Convert ebno to dB

Serial.println();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
void printRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct)
{
Serial.print(F("UBX-RXM-COR: ebno: "));
Serial.print(ubxDataStruct->ebno);
Serial.print((double)ubxDataStruct->ebno / 8, 3); //Convert to dB

Serial.print(F(" protocol: "));
if (ubxDataStruct->statusInfo.bits.protocol == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
void printRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct)
{
Serial.print(F("UBX-RXM-COR: ebno: "));
Serial.print(ubxDataStruct->ebno);
Serial.print((double)ubxDataStruct->ebno / 8, 3); //Convert to dB

Serial.print(F(" protocol: "));
if (ubxDataStruct->statusInfo.bits.protocol == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

const uint8_t currentKeyLengthBytes = 16;
const char currentDynamicKey[] = "<ADD YOUR L-Band or L-Band + IP DYNAMIC KEY HERE>";
const uint16_t currentKeyGPSWeek = 2192; // Update this when you add new keys
const uint32_t currentKeyGPSToW = 518400;
const uint16_t currentKeyGPSWeek = 2254; // Update this when you add new keys
const uint32_t currentKeyGPSToW = 0;

const uint8_t nextKeyLengthBytes = 16;
const char nextDynamicKey[] = "<ADD YOUR L-Band or L-Band + IP DYNAMIC KEY HERE>";
const uint16_t nextKeyGPSWeek = 2196; // Update this when you add new keys
const uint32_t nextKeyGPSToW = 518400;
const uint16_t nextKeyGPSWeek = 2258; // Update this when you add new keys
const uint32_t nextKeyGPSToW = 0;
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
void printRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct)
{
Serial.print(F("UBX-RXM-COR: ebno: "));
Serial.print(ubxDataStruct->ebno);
Serial.print((double)ubxDataStruct->ebno / 8, 3); //Convert to dB

Serial.print(F(" protocol: "));
if (ubxDataStruct->statusInfo.bits.protocol == 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
void printRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct)
{
Serial.print(F("UBX-RXM-COR: ebno: "));
Serial.print(ubxDataStruct->ebno);
Serial.print((double)ubxDataStruct->ebno / 8, 3); //Convert to dB

Serial.print(F(" protocol: "));
if (ubxDataStruct->statusInfo.bits.protocol == 1)
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS Arduino Library
version=2.2.22
version=2.2.24
author=SparkFun Electronics <[email protected]>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>
Expand Down