Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 5e80910

Browse files
committed
Add support for more RELPOS datums.
1 parent 5efc238 commit 5e80910

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino

+14
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ void loop()
5353
Serial.print("relPosD: ");
5454
Serial.println(myGPS.relPosInfo.relPosD, 4);
5555

56+
Serial.print("relPosLength: ");
57+
Serial.println(myGPS.relPosInfo.relPosLength);
58+
Serial.print("relPosHeading: ");
59+
Serial.println(myGPS.relPosInfo.relPosHeading);
60+
61+
Serial.print("relPosHPN: ");
62+
Serial.println(myGPS.relPosInfo.relPosHPN);
63+
Serial.print("relPosHPE: ");
64+
Serial.println(myGPS.relPosInfo.relPosHPE);
65+
Serial.print("relPosHPD: ");
66+
Serial.println(myGPS.relPosInfo.relPosHPD);
67+
Serial.print("relPosHPLength: ");
68+
Serial.println(myGPS.relPosInfo.relPosHPLength);
69+
5670
Serial.print("accN: ");
5771
Serial.println(myGPS.relPosInfo.accN, 4);
5872
Serial.print("accE: ");

examples/ZED-F9P/Example7_SetVal/Example7_SetVal.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void setup()
5757

5858
//Below is the original way we enabled the RTCM message on the I2C port. After that, we show how to do the same
5959
//but with setVal().
60-
//myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
60+
//Original: myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second
6161
//setValueSuccess = myGPS.setVal(0x209102bd, 1); //Set output rate of msg 1005 over the I2C port to once per second
6262

6363
if(setValueSuccess == true)

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun Ublox Arduino Library
2-
version=1.3.0
2+
version=1.3.1
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C and Serial Communication with Ublox modules

src/SparkFun_Ublox_Arduino_Library.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,14 @@ boolean SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait)
14581458
tempRelPos = extractLong(16);
14591459
relPosInfo.relPosD = tempRelPos / 100.0; //Convert cm to m
14601460

1461+
relPosInfo.relPosLength = extractLong(20);
1462+
relPosInfo.relPosHeading = extractLong(24);
1463+
1464+
relPosInfo.relPosHPN = payloadCfg[32];
1465+
relPosInfo.relPosHPE = payloadCfg[33];
1466+
relPosInfo.relPosHPD = payloadCfg[34];
1467+
relPosInfo.relPosHPLength = payloadCfg[35];
1468+
14611469
uint32_t tempAcc;
14621470

14631471
tempAcc = extractLong(24);

src/SparkFun_Ublox_Arduino_Library.h

+9
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,15 @@ class SFE_UBLOX_GPS
289289
float relPosN;
290290
float relPosE;
291291
float relPosD;
292+
293+
long relPosLength;
294+
long relPosHeading;
295+
296+
int8_t relPosHPN;
297+
int8_t relPosHPE;
298+
int8_t relPosHPD;
299+
int8_t relPosHPLength;
300+
292301
float accN;
293302
float accE;
294303
float accD;

0 commit comments

Comments
 (0)