Skip to content

Commit 8253ad5

Browse files
authored
Merge pull request #22 from sparkfun/release_candidate
v3.0.11 - add support for RTCM 1005 and 1006 parsing in pushRawData
2 parents e0e5680 + 92e4557 commit 8253ad5

File tree

6 files changed

+387
-18
lines changed

6 files changed

+387
-18
lines changed

examples/ZED-F9P/Example17_NTRIPClient_With_GGA_Callback/Example17_NTRIPClient_With_GGA_Callback.ino

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,54 @@ void loop()
230230

231231
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
232232

233+
// Check if the library has been able to extract the Antenna Reference Position from an RTCM 1005 message
234+
235+
RTCM_1005_data_t rtcmData1005;
236+
237+
if (myGNSS.getLatestRTCM1005Input(&rtcmData1005) == 2) // RTCM 1005 data received? 0 = no data, 1 = stale data, 2 = fresh data
238+
{
239+
double x = rtcmData1005.AntennaReferencePointECEFX;
240+
x /= 10000.0; // Convert to m
241+
double y = rtcmData1005.AntennaReferencePointECEFY;
242+
y /= 10000.0; // Convert to m
243+
double z = rtcmData1005.AntennaReferencePointECEFZ;
244+
z /= 10000.0; // Convert to m
245+
246+
Serial.print(F("NTRIP Server RTCM 1005: ARP ECEF-X: "));
247+
Serial.print(x, 4); // 4 decimal places
248+
Serial.print(F(" Y: "));
249+
Serial.print(y, 4); // 4 decimal places
250+
Serial.print(F(" Z: "));
251+
Serial.println(z, 4); // 4 decimal places
252+
}
253+
254+
// Check if the library has been able to extract the Antenna Reference Position from an RTCM 1006 message
255+
256+
RTCM_1006_data_t rtcmData1006;
257+
258+
if (myGNSS.getLatestRTCM1006Input(&rtcmData1006) == 2) // RTCM 1006 data received? 0 = no data, 1 = stale data, 2 = fresh data
259+
{
260+
double x = rtcmData1006.AntennaReferencePointECEFX;
261+
x /= 10000.0; // Convert to m
262+
double y = rtcmData1006.AntennaReferencePointECEFY;
263+
y /= 10000.0; // Convert to m
264+
double z = rtcmData1006.AntennaReferencePointECEFZ;
265+
z /= 10000.0; // Convert to m
266+
double h = rtcmData1006.AntennaHeight;
267+
h /= 10000.0; // Convert to m
268+
269+
Serial.print(F("NTRIP Server RTCM 1006: ARP ECEF-X: "));
270+
Serial.print(x, 4); // 4 decimal places
271+
Serial.print(F(" Y: "));
272+
Serial.print(y, 4); // 4 decimal places
273+
Serial.print(F(" Z: "));
274+
Serial.print(z, 4); // 4 decimal places
275+
Serial.print(F(" Height: "));
276+
Serial.println(h, 4); // 4 decimal places
277+
}
278+
279+
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
280+
233281
switch (state)
234282
{
235283
case open_connection:

keywords.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ NMEA_RMC_data_t KEYWORD1
8383
NMEA_ZDA_data_t KEYWORD1
8484

8585
RTCM_1005_data_t KEYWORD1
86+
RTCM_1006_data_t KEYWORD1
8687

8788
#######################################
8889
# Methods and Functions (KEYWORD2)
@@ -724,6 +725,10 @@ crc24q KEYWORD2
724725

725726
getLatestRTCM1005 KEYWORD2
726727
setRTCM1005callbackPtr KEYWORD2
728+
getLatestRTCM1005Input KEYWORD2
729+
getLatestRTCM1006Input KEYWORD2
730+
extractRTCM1005 KEYWORD2
731+
extractRTCM1006 KEYWORD2
727732

728733
enableUBXlogging KEYWORD2
729734

@@ -763,7 +768,6 @@ extractDouble KEYWORD2
763768
extractUnsignedBits KEYWORD2
764769
extractSignedBits KEYWORD2
765770

766-
767771
#######################################
768772
# Constants (LITERAL1)
769773
#######################################

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS v3
2-
version=3.0.10
2+
version=3.0.11
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>

0 commit comments

Comments
 (0)