Skip to content

Commit 196889a

Browse files
committed
Add getGeoidalSeparation()
1 parent 707e9b0 commit 196889a

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ getEcefZ KEYWORD2
8686
getEcefXDeviation KEYWORD2
8787
getEcefYDeviation KEYWORD2
8888
getEcefZDeviation KEYWORD2
89+
getGeoidalSeparation KEYWORD2
8990
getSIV KEYWORD2
9091
getSatellitesUsed KEYWORD2
9192
getSatellitesTracked KEYWORD2

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun UM980 Triband RTK GNSS Arduino Library
2-
version=1.0.9
2+
version=1.0.10
33
author=SparkFun Electronics
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for Serial Communication and Configuration of the UM980

src/SparkFun_Unicore_GNSS_Arduino_Library.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ void UM980::unicoreHandler(uint8_t *response, uint16_t length)
12491249
memcpy(&packetBESTNAV->data.latitude, &data[offsetBestnavLat], sizeof(double));
12501250
memcpy(&packetBESTNAV->data.longitude, &data[offsetBestnavLon], sizeof(double));
12511251
memcpy(&packetBESTNAV->data.altitude, &data[offsetBestnavHgt], sizeof(double));
1252+
memcpy(&packetBESTNAV->data.geoidalSeparation, &data[offsetBestnavUndulation], sizeof(float));
12521253
memcpy(&packetBESTNAV->data.horizontalSpeed, &data[offsetBestnavHorSpd], sizeof(double));
12531254
memcpy(&packetBESTNAV->data.verticalSpeed, &data[offsetBestnavVertSpd], sizeof(double));
12541255
memcpy(&packetBESTNAV->data.trackGround, &data[offsetBestnavTrkGnd], sizeof(double));
@@ -1587,6 +1588,11 @@ double UM980::getAltitude()
15871588
CHECK_POINTER_BOOL(packetBESTNAV, initBestnav); // Check that RAM has been allocated
15881589
return (packetBESTNAV->data.altitude);
15891590
}
1591+
double UM980::getGeoidalSeparation()
1592+
{
1593+
CHECK_POINTER_BOOL(packetBESTNAV, initBestnav); // Check that RAM has been allocated
1594+
return ((double)packetBESTNAV->data.geoidalSeparation);
1595+
}
15901596
double UM980::getHorizontalSpeed()
15911597
{
15921598
CHECK_POINTER_BOOL(packetBESTNAV, initBestnav); // Check that RAM has been allocated

src/SparkFun_Unicore_GNSS_Arduino_Library.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ typedef enum
9898
#define offsetBestnavLat ((uint16_t)8)
9999
#define offsetBestnavLon ((uint16_t)16)
100100
#define offsetBestnavHgt ((uint16_t)24)
101+
#define offsetBestnavUndulation ((uint16_t)32)
101102
#define offsetBestnavLatDeviation ((uint16_t)40)
102103
#define offsetBestnavLonDeviation ((uint16_t)44)
103104
#define offsetBestnavHgtDeviation ((uint16_t)48)
@@ -301,6 +302,8 @@ class UM980
301302
float getEcefYDeviation();
302303
float getEcefZDeviation();
303304

305+
double getGeoidalSeparation();
306+
304307
uint8_t getSIV();
305308
uint8_t getSatellitesTracked();
306309
uint8_t getSatellitesUsed();

src/unicore_structs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ typedef struct
77
double latitude;
88
double longitude;
99
double altitude;
10+
float geoidalSeparation;
1011
double horizontalSpeed;
1112
double verticalSpeed;
1213
double trackGround;

0 commit comments

Comments
 (0)