@@ -43,6 +43,7 @@ void setup()
43
43
Wire.begin ();
44
44
45
45
// myGPS.enableDebugging(); // Uncomment this line to enable lots of helpful debug messages
46
+ // myGPS.enableDebugging(Serial, true); // Uncomment this line to enable the minimum of helpful debug messages
46
47
47
48
if (myGPS.begin () == false ) // Connect to the Ublox module using Wire port
48
49
{
@@ -55,21 +56,21 @@ void setup()
55
56
56
57
myGPS.setI2COutput (COM_TYPE_UBX); // Set the I2C port to output UBX only (turn off NMEA noise)
57
58
myGPS.saveConfigSelective (VAL_CFG_SUBSEC_IOPORT); // Save the communications port settings to flash and BBR
58
-
59
+
59
60
myGPS.setNavigationFrequency (1 ); // Produce one solution per second
60
-
61
+
61
62
62
63
// The acid test: all four of these combinations should work seamlessly :-)
63
-
64
+
64
65
// myGPS.setAutoPVT(false); // Library will poll each reading
65
66
// myGPS.setAutoHPPOSLLH(false); // Library will poll each reading
66
-
67
+
67
68
// myGPS.setAutoPVT(true); // Tell the GPS to "send" each solution automatically
68
69
// myGPS.setAutoHPPOSLLH(false); // Library will poll each reading
69
70
70
71
// myGPS.setAutoPVT(false); // Library will poll each reading
71
72
// myGPS.setAutoHPPOSLLH(true); // Tell the GPS to "send" each hi res solution automatically
72
-
73
+
73
74
myGPS.setAutoPVT (true ); // Tell the GPS to "send" each solution automatically
74
75
myGPS.setAutoHPPOSLLH (true ); // Tell the GPS to "send" each hi res solution automatically
75
76
}
@@ -81,31 +82,31 @@ void loop()
81
82
if ((myGPS.getHPPOSLLH ()) || (myGPS.getPVT ()))
82
83
{
83
84
Serial.println ();
84
-
85
+
85
86
long highResLatitude = myGPS.getHighResLatitude ();
86
87
Serial.print (F (" Hi Res Lat: " ));
87
88
Serial.print (highResLatitude);
88
-
89
+
89
90
int highResLatitudeHp = myGPS.getHighResLatitudeHp ();
90
91
Serial.print (F (" " ));
91
92
Serial.print (highResLatitudeHp);
92
-
93
+
93
94
long highResLongitude = myGPS.getHighResLongitude ();
94
95
Serial.print (F (" Hi Res Long: " ));
95
96
Serial.print (highResLongitude);
96
-
97
+
97
98
int highResLongitudeHp = myGPS.getHighResLongitudeHp ();
98
99
Serial.print (F (" " ));
99
100
Serial.print (highResLongitudeHp);
100
-
101
+
101
102
unsigned long horizAccuracy = myGPS.getHorizontalAccuracy ();
102
103
Serial.print (F (" Horiz accuracy: " ));
103
104
Serial.print (horizAccuracy);
104
-
105
+
105
106
long latitude = myGPS.getLatitude ();
106
107
Serial.print (F (" Lat: " ));
107
108
Serial.print (latitude);
108
-
109
+
109
110
long longitude = myGPS.getLongitude ();
110
111
Serial.print (F (" Long: " ));
111
112
Serial.println (longitude);
0 commit comments