Add setDGNSSConfiguration

This commit is contained in:
PaulZC
2022-01-13 14:06:52 +00:00
parent a08198b27e
commit 3cede3bfff
6 changed files with 43 additions and 2 deletions
+12
View File
@@ -57,6 +57,18 @@ If you are using the Dead Reckoning Sensor Fusion or High Dynamic Rate messages,
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). 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).
## Automatic support for correction services like 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 simple 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:
* ```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
* ```setHighPrecisionMode``` : adds extra decimal places in the GGA messages, increasing the resolution of latitude, longitude and altitude
Please see the [new examples](./examples/Automatic_NMEA) for more details.
## Memory Usage ## Memory Usage
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). 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).
+1 -1
View File
@@ -49,12 +49,12 @@ In v2.0, the full list of messages which can be processed and logged automatical
- UBX-NAV-DOP (0x01 0x04): Dilution of precision - UBX-NAV-DOP (0x01 0x04): Dilution of precision
- UBX-NAV-ATT (0x01 0x05): Attitude solution (**only with ADR or UDR products**) - UBX-NAV-ATT (0x01 0x05): Attitude solution (**only with ADR or UDR products**)
- UBX-NAV-PVT (0x01 0x07): Navigation position velocity time solution - UBX-NAV-PVT (0x01 0x07): Navigation position velocity time solution
- UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution (**only with ADR or UDR products**)
- UBX-NAV-ODO (0x01 0x09): Odometer solution - UBX-NAV-ODO (0x01 0x09): Odometer solution
- UBX-NAV-VELECEF (0x01 0x11): Velocity solution in ECEF - UBX-NAV-VELECEF (0x01 0x11): Velocity solution in ECEF
- UBX-NAV-VELNED (0x01 0x12): Velocity solution in NED frame - UBX-NAV-VELNED (0x01 0x12): Velocity solution in NED frame
- UBX-NAV-HPPOSECEF (0x01 0x13): High precision position solution in ECEF - UBX-NAV-HPPOSECEF (0x01 0x13): High precision position solution in ECEF
- UBX-NAV-HPPOSLLH (0x01 0x14): High precision geodetic position solution - UBX-NAV-HPPOSLLH (0x01 0x14): High precision geodetic position solution
- UBX-NAV-PVAT (0x01 0x17): Navigation position velocity attitude time solution (**only with ADR or UDR products**)
- UBX-NAV-CLOCK (0x01 0x22): Clock solution - UBX-NAV-CLOCK (0x01 0x22): Clock solution
- UBX-NAV-SVIN (0x01 0x3B): Survey-in data (**only with High Precision GNSS products**) - UBX-NAV-SVIN (0x01 0x3B): Survey-in data (**only with High Precision GNSS products**)
- UBX-NAV-RELPOSNED (0x01 0x3C): Relative positioning information in NED frame (**only with High Precision GNSS products**) - UBX-NAV-RELPOSNED (0x01 0x3C): Relative positioning information in NED frame (**only with High Precision GNSS products**)
+4
View File
@@ -140,6 +140,7 @@ setSurveyMode KEYWORD2
enableSurveyMode KEYWORD2 enableSurveyMode KEYWORD2
disableSurveyMode KEYWORD2 disableSurveyMode KEYWORD2
setStaticPosition KEYWORD2 setStaticPosition KEYWORD2
setDGNSSConfiguration KEYWORD2
getProtocolVersionHigh KEYWORD2 getProtocolVersionHigh KEYWORD2
getProtocolVersionLow KEYWORD2 getProtocolVersionLow KEYWORD2
@@ -761,3 +762,6 @@ SFE_UBLOX_MAIN_TALKER_ID_GN LITERAL1
SFE_UBLOX_MAIN_TALKER_ID_GA LITERAL1 SFE_UBLOX_MAIN_TALKER_ID_GA LITERAL1
SFE_UBLOX_MAIN_TALKER_ID_GB LITERAL1 SFE_UBLOX_MAIN_TALKER_ID_GB LITERAL1
SFE_UBLOX_MAIN_TALKER_ID_GQ LITERAL1 SFE_UBLOX_MAIN_TALKER_ID_GQ LITERAL1
SFE_UBLOX_DGNSS_MODE_FLOAT LITERAL1
SFE_UBLOX_DGNSS_MODE_FIXED LITERAL1
+1 -1
View File
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS Arduino Library name=SparkFun u-blox GNSS Arduino Library
version=2.1.5 version=2.2.0
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 and Serial Communication with u-blox GNSS modules<br/><br/> sentence=Library for I2C and Serial Communication with u-blox GNSS modules<br/><br/>
@@ -6235,6 +6235,23 @@ bool SFE_UBLOX_GNSS::setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, i
return (setStaticPosition(ecefXOrLat, 0, ecefYOrLon, 0, ecefZOrAlt, 0, latlong, maxWait)); return (setStaticPosition(ecefXOrLat, 0, ecefYOrLon, 0, ecefZOrAlt, 0, latlong, maxWait));
} }
// Set the DGNSS differential mode
bool SFE_UBLOX_GNSS::setDGNSSConfiguration(sfe_ublox_dgnss_mode_e dgnssMode, uint16_t maxWait)
{
packetCfg.cls = UBX_CLASS_CFG;
packetCfg.id = UBX_CFG_DGNSS;
packetCfg.len = 4;
packetCfg.startingSpot = 0;
payloadCfg[0] = (uint8_t)dgnssMode;
payloadCfg[1] = 0; // reserved0
payloadCfg[2] = 0;
payloadCfg[3] = 0;
return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
}
// Module Protocol Version // Module Protocol Version
//Get the current protocol version of the u-blox module we're communicating with //Get the current protocol version of the u-blox module we're communicating with
@@ -534,6 +534,13 @@ enum sfe_ublox_talker_ids_e
SFE_UBLOX_MAIN_TALKER_ID_GQ SFE_UBLOX_MAIN_TALKER_ID_GQ
}; };
// The DGNSS differential mode
enum sfe_ublox_dgnss_mode_e
{
SFE_UBLOX_DGNSS_MODE_FLOAT = 2, // No attempts are made to fix ambiguities
SFE_UBLOX_DGNSS_MODE_FIXED // Ambiguities are fixed whenever possible
};
//-=-=-=-=- //-=-=-=-=-
#ifndef MAX_PAYLOAD_SIZE #ifndef MAX_PAYLOAD_SIZE
@@ -829,6 +836,7 @@ public:
// For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm // For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm
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); 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);
bool setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latLong = false, uint16_t maxWait = 250); bool setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latLong = false, uint16_t maxWait = 250);
bool setDGNSSConfiguration(sfe_ublox_dgnss_mode_e dgnssMode = SFE_UBLOX_DGNSS_MODE_FIXED, uint16_t maxWait = defaultMaxWait); // Set the DGNSS differential mode
//Read the module's protocol version //Read the module's protocol version
uint8_t getProtocolVersionHigh(uint16_t maxWait = defaultMaxWait); //Returns the PROTVER XX.00 from UBX-MON-VER register uint8_t getProtocolVersionHigh(uint16_t maxWait = defaultMaxWait); //Returns the PROTVER XX.00 from UBX-MON-VER register