Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3cede3b

Browse files
committedJan 13, 2022
Add setDGNSSConfiguration
1 parent a08198b commit 3cede3b

6 files changed

+43
-2
lines changed
 

‎README.md

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ If you are using the Dead Reckoning Sensor Fusion or High Dynamic Rate messages,
5757

5858
v2.1.0 of the library adds support for u-blox AssistNow<sup>TM</sup> Assisted GNSS (A-GNSS) which can dramatically reduce the time-to-first-fix. You can find further details in the [AssistNow Examples folder](./examples/AssistNow).
5959

60+
## Automatic support for correction services like RTK2go, Emlid Caster and Skylark (Swift Navigation)
61+
62+
RTK NTRIP corrections services often require you to send them your location in NMEA GPGGA format. v2.2 of the library makes this simple by providing get functions and automatic callbacks
63+
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!
64+
65+
v2.2 also includes two new functions useful for correction services:
66+
67+
* ```setMainTalkerID``` : lets you change the NMEA Talker ID (prefix) from "GN" to "GP" - just in case your correction service really does need GPGGA, not GNGGA
68+
* ```setHighPrecisionMode``` : adds extra decimal places in the GGA messages, increasing the resolution of latitude, longitude and altitude
69+
70+
Please see the [new examples](./examples/Automatic_NMEA) for more details.
71+
6072
## Memory Usage
6173

6274
The u-blox GNSS library has grown considerably over the years and v2.0.8 came very close to completely filling the program memory on platforms like the ATmega328 (Arduino Uno).

‎Theory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ In v2.0, the full list of messages which can be processed and logged automatical
4949
- UBX-NAV-DOP (0x01 0x04): Dilution of precision
5050
- UBX-NAV-ATT (0x01 0x05): Attitude solution (**only with ADR or UDR products**)
5151
- UBX-NAV-PVT (0x01 0x07): Navigation position velocity time solution
52-
- UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution (**only with ADR or UDR products**)
5352
- UBX-NAV-ODO (0x01 0x09): Odometer solution
5453
- UBX-NAV-VELECEF (0x01 0x11): Velocity solution in ECEF
5554
- UBX-NAV-VELNED (0x01 0x12): Velocity solution in NED frame
5655
- UBX-NAV-HPPOSECEF (0x01 0x13): High precision position solution in ECEF
5756
- UBX-NAV-HPPOSLLH (0x01 0x14): High precision geodetic position solution
57+
- UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution (**only with ADR or UDR products**)
5858
- UBX-NAV-CLOCK (0x01 0x22): Clock solution
5959
- UBX-NAV-SVIN (0x01 0x3B): Survey-in data (**only with High Precision GNSS products**)
6060
- UBX-NAV-RELPOSNED (0x01 0x3C): Relative positioning information in NED frame (**only with High Precision GNSS products**)

‎keywords.txt

+4
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ setSurveyMode KEYWORD2
140140
enableSurveyMode KEYWORD2
141141
disableSurveyMode KEYWORD2
142142
setStaticPosition KEYWORD2
143+
setDGNSSConfiguration KEYWORD2
143144

144145
getProtocolVersionHigh KEYWORD2
145146
getProtocolVersionLow KEYWORD2
@@ -761,3 +762,6 @@ SFE_UBLOX_MAIN_TALKER_ID_GN LITERAL1
761762
SFE_UBLOX_MAIN_TALKER_ID_GA LITERAL1
762763
SFE_UBLOX_MAIN_TALKER_ID_GB LITERAL1
763764
SFE_UBLOX_MAIN_TALKER_ID_GQ LITERAL1
765+
766+
SFE_UBLOX_DGNSS_MODE_FLOAT LITERAL1
767+
SFE_UBLOX_DGNSS_MODE_FIXED LITERAL1

‎library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS Arduino Library
2-
version=2.1.5
2+
version=2.2.0
33
author=SparkFun Electronics <techsupport@sparkfun.com>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C and Serial Communication with u-blox GNSS modules<br/><br/>

‎src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -6235,6 +6235,23 @@ bool SFE_UBLOX_GNSS::setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, i
62356235
return (setStaticPosition(ecefXOrLat, 0, ecefYOrLon, 0, ecefZOrAlt, 0, latlong, maxWait));
62366236
}
62376237

6238+
// Set the DGNSS differential mode
6239+
bool SFE_UBLOX_GNSS::setDGNSSConfiguration(sfe_ublox_dgnss_mode_e dgnssMode, uint16_t maxWait)
6240+
{
6241+
packetCfg.cls = UBX_CLASS_CFG;
6242+
packetCfg.id = UBX_CFG_DGNSS;
6243+
packetCfg.len = 4;
6244+
packetCfg.startingSpot = 0;
6245+
6246+
payloadCfg[0] = (uint8_t)dgnssMode;
6247+
payloadCfg[1] = 0; // reserved0
6248+
payloadCfg[2] = 0;
6249+
payloadCfg[3] = 0;
6250+
6251+
return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
6252+
}
6253+
6254+
62386255
// Module Protocol Version
62396256

62406257
//Get the current protocol version of the u-blox module we're communicating with

‎src/SparkFun_u-blox_GNSS_Arduino_Library.h

+8
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,13 @@ enum sfe_ublox_talker_ids_e
534534
SFE_UBLOX_MAIN_TALKER_ID_GQ
535535
};
536536

537+
// The DGNSS differential mode
538+
enum sfe_ublox_dgnss_mode_e
539+
{
540+
SFE_UBLOX_DGNSS_MODE_FLOAT = 2, // No attempts are made to fix ambiguities
541+
SFE_UBLOX_DGNSS_MODE_FIXED // Ambiguities are fixed whenever possible
542+
};
543+
537544
//-=-=-=-=-
538545

539546
#ifndef MAX_PAYLOAD_SIZE
@@ -829,6 +836,7 @@ class SFE_UBLOX_GNSS
829836
// For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm
830837
bool setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP, int32_t ecefYOrLon, int8_t ecefYOrLonHP, int32_t ecefZOrAlt, int8_t ecefZOrAltHP, bool latLong = false, uint16_t maxWait = 250);
831838
bool setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latLong = false, uint16_t maxWait = 250);
839+
bool setDGNSSConfiguration(sfe_ublox_dgnss_mode_e dgnssMode = SFE_UBLOX_DGNSS_MODE_FIXED, uint16_t maxWait = defaultMaxWait); // Set the DGNSS differential mode
832840

833841
//Read the module's protocol version
834842
uint8_t getProtocolVersionHigh(uint16_t maxWait = defaultMaxWait); //Returns the PROTVER XX.00 from UBX-MON-VER register

0 commit comments

Comments
 (0)
Please sign in to comment.