@@ -85,14 +85,15 @@ const uint8_t UBX_CLASS_LOG = 0x21;
85
85
const uint8_t UBX_CLASS_SEC = 0x27 ;
86
86
const uint8_t UBX_CLASS_HNR = 0x28 ;
87
87
88
- const uint8_t UBX_CFG_PRT = 0x00 ;
89
- const uint8_t UBX_CFG_RATE = 0x08 ;
88
+ const uint8_t UBX_CFG_PRT = 0x00 ; // Used to configure port specifics
89
+ const uint8_t UBX_CFG_RATE = 0x08 ; // Used to set port baud rates
90
90
91
91
const uint8_t UBX_CFG_TMODE3 = 0x71 ; // Used to enable Survey In Mode
92
92
const uint8_t SVIN_MODE_DISABLE = 0x00 ;
93
93
const uint8_t SVIN_MODE_ENABLE = 0x01 ;
94
94
95
95
const uint8_t UBX_NAV_SVIN = 0x3B ; // Used for checking Survey In status
96
+ const uint8_t UBX_NAV_HPPOSECEF = 0x13 ; // Find our positional accuracy (high precision)
96
97
97
98
// The following are used to enable RTCM messages
98
99
const uint8_t UBX_CFG_MSG = 0x01 ;
@@ -132,7 +133,7 @@ class SFE_UBLOX_GPS
132
133
SFE_UBLOX_GPS (void );
133
134
134
135
// By default use the default I2C address, and use Wire port
135
- void begin (TwoWire &wirePort);
136
+ void begin (TwoWire &wirePort = Wire );
136
137
137
138
boolean isConnected (); // Returns turn if device answers on _gpsI2Caddress address
138
139
@@ -167,6 +168,8 @@ class SFE_UBLOX_GPS
167
168
boolean setRTCMport (uint8_t portID, boolean enableRTCM3, uint16_t maxWait = 250 ); // Enable/Disable RTCM3 (both input and output) for a given port
168
169
169
170
boolean getPortSettings (uint8_t portID, uint16_t maxWait = 250 ); // Returns the current protocol bits in the UBX-CFG-PRT command for a given port
171
+
172
+ uint32_t getPositionAccuracy (uint16_t maxWait = 500 ); // Returns the 3D accuracy of the current high-precision fix
170
173
171
174
struct svinStructure {
172
175
boolean active;
@@ -176,7 +179,7 @@ class SFE_UBLOX_GPS
176
179
} svin;
177
180
178
181
uint16_t rtcmFrameCounter = 0 ;
179
-
182
+
180
183
private:
181
184
182
185
// Depending on the sentence type the processor will load characters into different arrays
0 commit comments