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

Commit 3a8ed65

Browse files
committed
Adding RELPOSNED basic function
1 parent 6cf6860 commit 3a8ed65

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Diff for: keywords.txt

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ getProtocolVersionHigh KEYWORD2
7878
getProtocolVersionLow KEYWORD2
7979
getProtocolVersion KEYWORD2
8080

81+
getRELPOSNED KEYWORD2
82+
8183
factoryReset KEYWORD2
8284
setAutoPVT KEYWORD2
8385

Diff for: src/SparkFun_Ublox_Arduino_Library.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -1340,3 +1340,22 @@ boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait)
13401340

13411341
return (true);
13421342
}
1343+
1344+
//Relative Positioning Information in NED frame
1345+
//Returns true if commands was successful
1346+
boolean SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait)
1347+
{
1348+
packetCfg.cls = UBX_CLASS_NAV;
1349+
packetCfg.id = UBX_NAV_RELPOSNED;
1350+
packetCfg.len = 0;
1351+
packetCfg.startingSpot = 0;
1352+
1353+
if (sendCommand(packetCfg, maxWait) == false)
1354+
return (false); //If command send fails then bail
1355+
1356+
//We got a response, now parse the bits
1357+
Serial.print("RELPOSNED: 0x");
1358+
Serial.println(payloadCfg[38], HEX);
1359+
1360+
return (true);
1361+
}

Diff for: src/SparkFun_Ublox_Arduino_Library.h

+2
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ class SFE_UBLOX_GPS
268268
uint8_t getProtocolVersionLow(uint16_t maxWait = 1000); //Returns the PROTVER 00.XX from UBX-MON-VER register
269269
boolean getProtocolVersion(uint16_t maxWait = 1000); //Queries module, loads low/high bytes
270270

271+
boolean getRELPOSNED(uint16_t maxWait = 1000); //Get Relative Positioning Information of the NED frame
272+
271273
//Survey-in specific controls
272274
struct svinStructure
273275
{

0 commit comments

Comments
 (0)