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

Commit 0b48d58

Browse files
authored
Merge pull request #160 from sparkfun/release_candidate
Merging release_candidate : version 1.8.9
2 parents d4ded7d + bc2ee9c commit 0b48d58

File tree

8 files changed

+1010
-45
lines changed

8 files changed

+1010
-45
lines changed

Diff for: README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Thanks to:
5151
* [dotMorten](https://github.com/dotMorten) for the MSGOUT keys, autoHPPOSLLH, autoDOP and upgrades to autoPVT.
5252
* [markuckermann](https://github.com/markuckermann) for spotting the config layer gremlins
5353
* [vid553](https://github.com/vid553) for the Zephyr port
54-
* [balamuruganky](https://github.com/balamuruganky) for the NAV-PVT velocity parameters
54+
* [balamuruganky](https://github.com/balamuruganky) for the NAV-PVT velocity parameters, getSpeedAccEst, getHeadingAccEst, getInvalidLlh, getHeadVeh, getMagDec and getMagAcc
5555
* [nelarsen](https://github.com/nelarsen) for the buffer overrun improvements
5656
* [mstranne](https://github.com/mstranne) and [shaneperera](https://github.com/shaneperera) for the pushRawData suggestion
5757
* [rubienr](https://github.com/rubienr) for spotting the logical AND issues
@@ -113,6 +113,21 @@ packets in its internal buffer (about 500 bytes) and the library will read those
113113
called, update its internal copy of the nav data 5 times, and return `true` to the sketch. The
114114
sketch calls `getLatitude`, etc. and retrieve the data of the most recent of those 5 packets.
115115

116+
The library also supports:
117+
* `autoHPPOSLLH`
118+
* `autoDOP`
119+
* `autoHNRAtt`
120+
* `autoHNRDyn`
121+
* `autoHNRPVT`
122+
123+
Memory Usage
124+
---------------------------------
125+
126+
Version 1.8.9 introduced support for `autoHNR` on the NEO-M8U, and that tipped the balance in terms of RAM use on the ATmega328.
127+
The library does still run on the ATmega328 but you will see _**Low memory available, stability problems may occur**_ warnings
128+
as the global variables now occupy 1540 bytes of RAM. If you do want to run this library on the ATmega328, you may need to regress
129+
to Version 1.8.8 via the Library Manager.
130+
116131
Products That Use This Library
117132
---------------------------------
118133
* [GPS-16481](https://www.sparkfun.com/products/16481) - SparkFun GPS-RTK-SMA Breakout - ZED-F9P (Qwiic)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
By: Paul Clark
3+
SparkFun Electronics
4+
Date: December, 2020
5+
License: MIT. See license file for more information but you can
6+
basically do whatever you want with this code.
7+
8+
This example configures the High Navigation Rate on the NEO-M8U and then
9+
polls and displays the attitude solution, vehicle dynamics information
10+
and high rate position, velocity and time.
11+
12+
This example polls the high rate data.
13+
(The next example uses "autoHNR" to receive the HNR data automatically.)
14+
15+
Please make sure your NEO-M8U is running UDR firmware >= 1.31. Please update using u-center if necessary:
16+
https://www.u-blox.com/en/product/neo-m8u-module#tab-documentation-resources
17+
18+
Feel like supporting open source hardware?
19+
Buy a board from SparkFun!
20+
NEO-M8U: https://www.sparkfun.com/products/16329
21+
22+
Hardware Connections:
23+
Plug a Qwiic cable into the GPS and a Redboard Qwiic
24+
If you don't have a platform with a Qwiic connection use the
25+
SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
26+
Open the serial monitor at 115200 baud to see the output
27+
28+
*/
29+
30+
#include <Wire.h> //Needed for I2C to GPS
31+
32+
#include <SparkFun_Ublox_Arduino_Library.h> //http://librarymanager/All#SparkFun_Ublox_GPS
33+
SFE_UBLOX_GPS myGPS;
34+
35+
void setup()
36+
{
37+
Serial.begin(115200);
38+
while (!Serial); //Wait for user to open terminal
39+
Serial.println(F("SparkFun u-blox Example"));
40+
41+
Wire.begin();
42+
43+
//myGPS.enableDebugging(); // Uncomment this line to enable debug messages on Serial
44+
45+
if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
46+
{
47+
Serial.println(F("Warning! u-blox GPS did not begin correctly."));
48+
Serial.println(F("(This may be because the I2C port is busy with HNR messages.)"));
49+
}
50+
51+
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
52+
myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the communications port settings to flash and BBR
53+
54+
if (myGPS.setHNRNavigationRate(10) == true) //Set the High Navigation Rate to 10Hz
55+
Serial.println(F("setHNRNavigationRate was successful"));
56+
else
57+
Serial.println(F("setHNRNavigationRate was NOT successful"));
58+
}
59+
60+
void loop()
61+
{
62+
// Poll and print selected HNR data
63+
if (myGPS.getHNRAtt(125) == true) // Request HNR Att data using a 125ms timeout
64+
{
65+
Serial.print(F("Roll: "));
66+
Serial.print(myGPS.hnrAtt.roll);
67+
Serial.print(F(" Pitch: "));
68+
Serial.print(myGPS.hnrAtt.pitch);
69+
Serial.print(F(" Heading: "));
70+
Serial.println(myGPS.hnrAtt.heading);
71+
}
72+
if (myGPS.getHNRDyn(125) == true) // Request HNR Dyn data using a 125ms timeout
73+
{
74+
Serial.print(F("xAccel: "));
75+
Serial.print(myGPS.hnrVehDyn.xAccel);
76+
Serial.print(F(" yAccel: "));
77+
Serial.print(myGPS.hnrVehDyn.yAccel);
78+
Serial.print(F(" zAccel: "));
79+
Serial.println(myGPS.hnrVehDyn.zAccel);
80+
}
81+
if (myGPS.getHNRPVT(125) == true) // Request HNR PVT data using a 125ms timeout
82+
{
83+
Serial.print(F("ns: "));
84+
Serial.print(myGPS.hnrPVT.nano);
85+
Serial.print(F(" Lat: "));
86+
Serial.print(myGPS.hnrPVT.lat);
87+
Serial.print(F(" Lon: "));
88+
Serial.println(myGPS.hnrPVT.lon);
89+
}
90+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/*
2+
By: Paul Clark
3+
SparkFun Electronics
4+
Date: December, 2020
5+
License: MIT. See license file for more information but you can
6+
basically do whatever you want with this code.
7+
8+
This example configures the High Navigation Rate on the NEO-M8U and then
9+
reads and displays the attitude solution, vehicle dynamics information
10+
and high rate position, velocity and time.
11+
12+
This example uses "autoHNR" to receive the HNR data automatically.
13+
14+
Please make sure your NEO-M8U is running UDR firmware >= 1.31. Please update using u-center if necessary:
15+
https://www.u-blox.com/en/product/neo-m8u-module#tab-documentation-resources
16+
17+
Feel like supporting open source hardware?
18+
Buy a board from SparkFun!
19+
NEO-M8U: https://www.sparkfun.com/products/16329
20+
21+
Hardware Connections:
22+
Plug a Qwiic cable into the GPS and a Redboard Qwiic
23+
If you don't have a platform with a Qwiic connection use the
24+
SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
25+
Open the serial monitor at 115200 baud to see the output
26+
27+
*/
28+
29+
#include <Wire.h> //Needed for I2C to GPS
30+
31+
#include <SparkFun_Ublox_Arduino_Library.h> //http://librarymanager/All#SparkFun_Ublox_GPS
32+
SFE_UBLOX_GPS myGPS;
33+
34+
boolean usingAutoHNRAtt = false;
35+
boolean usingAutoHNRDyn = false;
36+
boolean usingAutoHNRPVT = false;
37+
38+
void setup()
39+
{
40+
Serial.begin(115200);
41+
while (!Serial); //Wait for user to open terminal
42+
Serial.println(F("SparkFun u-blox Example"));
43+
44+
Wire.begin();
45+
46+
//myGPS.enableDebugging(); // Uncomment this line to enable debug messages on Serial
47+
48+
if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
49+
{
50+
Serial.println(F("Warning! u-blox GPS did not begin correctly."));
51+
Serial.println(F("(This may be because the I2C port is busy with HNR messages.)"));
52+
}
53+
54+
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
55+
myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the communications port settings to flash and BBR
56+
57+
if (myGPS.setHNRNavigationRate(10) == true) //Set the High Navigation Rate to 10Hz
58+
Serial.println(F("setHNRNavigationRate was successful"));
59+
else
60+
Serial.println(F("setHNRNavigationRate was NOT successful"));
61+
62+
usingAutoHNRAtt = myGPS.setAutoHNRAtt(true); //Attempt to enable auto HNR attitude messages
63+
usingAutoHNRDyn = myGPS.setAutoHNRDyn(true); //Attempt to enable auto HNR vehicle dynamics messages
64+
usingAutoHNRPVT = myGPS.setAutoHNRPVT(true); //Attempt to enable auto HNR PVT messages
65+
}
66+
67+
void loop()
68+
{
69+
if (usingAutoHNRAtt && (myGPS.getHNRAtt() == true)) // If setAutoHNRAtt was successful and new data is available
70+
{
71+
Serial.print(F("Roll: ")); // Print selected data
72+
Serial.print(myGPS.hnrAtt.roll);
73+
Serial.print(F(" Pitch: "));
74+
Serial.print(myGPS.hnrAtt.pitch);
75+
Serial.print(F(" Heading: "));
76+
Serial.println(myGPS.hnrAtt.heading);
77+
}
78+
if (usingAutoHNRDyn && (myGPS.getHNRDyn() == true)) // If setAutoHNRDyn was successful and new data is available
79+
{
80+
Serial.print(F("xAccel: ")); // Print selected data
81+
Serial.print(myGPS.hnrVehDyn.xAccel);
82+
Serial.print(F(" yAccel: "));
83+
Serial.print(myGPS.hnrVehDyn.yAccel);
84+
Serial.print(F(" zAccel: "));
85+
Serial.println(myGPS.hnrVehDyn.zAccel);
86+
}
87+
if (usingAutoHNRPVT && (myGPS.getHNRPVT() == true)) // If setAutoHNRPVT was successful and new data is available
88+
{
89+
Serial.print(F("ns: ")); // Print selected data
90+
Serial.print(myGPS.hnrPVT.nano);
91+
Serial.print(F(" Lat: "));
92+
Serial.print(myGPS.hnrPVT.lat);
93+
Serial.print(F(" Lon: "));
94+
Serial.println(myGPS.hnrPVT.lon);
95+
}
96+
}

Diff for: examples/Example13_PVT/Example1_AutoPVT/Example1_AutoPVT.ino

+29-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ void setup()
5454
void loop()
5555
{
5656
// Calling getPVT returns true if there actually is a fresh navigation solution available.
57-
if (myGPS.getPVT())
57+
// Start the reading only when valid LLH is available
58+
if (myGPS.getPVT() && (myGPS.getInvalidLlh() == false))
5859
{
5960
Serial.println();
6061
long latitude = myGPS.getLatitude();
@@ -105,6 +106,33 @@ void loop()
105106
Serial.print(horizontalAccEst);
106107
Serial.print(F(" (mm)"));
107108

109+
int speedAccEst = myGPS.getSpeedAccEst();
110+
Serial.print(F(" SpeedAccEst: "));
111+
Serial.print(speedAccEst);
112+
Serial.print(F(" (mm/s)"));
113+
114+
int headAccEst = myGPS.getHeadingAccEst();
115+
Serial.print(F(" HeadAccEst: "));
116+
Serial.print(headAccEst);
117+
Serial.print(F(" (degrees * 10^-5)"));
118+
119+
if (myGPS.getHeadVehValid() == true) {
120+
int headVeh = myGPS.getHeadVeh();
121+
Serial.print(F(" HeadVeh: "));
122+
Serial.print(headVeh);
123+
Serial.print(F(" (degrees * 10^-5)"));
124+
125+
int magDec = myGPS.getMagDec();
126+
Serial.print(F(" MagDec: "));
127+
Serial.print(magDec);
128+
Serial.print(F(" (degrees * 10^-2)"));
129+
130+
int magAcc = myGPS.getMagAcc();
131+
Serial.print(F(" MagAcc: "));
132+
Serial.print(magAcc);
133+
Serial.print(F(" (degrees * 10^-2)"));
134+
}
135+
108136
Serial.println();
109137
} else {
110138
Serial.print(".");

Diff for: keywords.txt

+19
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ getVerticalAccEst KEYWORD2
5858
getNedNorthVel KEYWORD2
5959
getNedEastVel KEYWORD2
6060
getNedDownVel KEYWORD2
61+
getSpeedAccEst KEYWORD2
62+
getHeadingAccEst KEYWORD2
63+
getInvalidLlh KEYWORD2
64+
getHeadVeh KEYWORD2
65+
getMagDec KEYWORD2
66+
getMagAcc KEYWORD2
67+
getHeadVehValid KEYWORD2
6168

6269
setPortOutput KEYWORD2
6370
setPortInput KEYWORD2
@@ -175,6 +182,18 @@ setStaticPosition KEYWORD2
175182

176183
pushRawData KEYWORD2
177184

185+
setHNRNavigationRate KEYWORD2
186+
getHNRNavigationRate KEYWORD2
187+
assumeAutoHNRAtt KEYWORD2
188+
setAutoHNRAtt KEYWORD2
189+
getHNRAtt KEYWORD2
190+
assumeAutoHNRDyn KEYWORD2
191+
setAutoHNRDyn KEYWORD2
192+
getHNRDyn KEYWORD2
193+
assumeAutoHNRPVT KEYWORD2
194+
setAutoHNRPVT KEYWORD2
195+
getHNRPVT KEYWORD2
196+
178197
#######################################
179198
# Constants (LITERAL1)
180199
#######################################

Diff for: library.properties

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

0 commit comments

Comments
 (0)