You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/AssistNow/AssistNow_Autonomous/Example1_AssistNowAutonomous_Read/Example1_AssistNowAutonomous_Read.ino
+65-9
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@
7
7
8
8
This example shows how to enable, check the status of, and read the AssistNow Autonomous data from the module.
9
9
10
+
Note: this example will only work on boards which have plenty of RAM available.
11
+
The database can be several kBytes in length and needs to be stored twice:
12
+
once inside the library (by readNavigationDatabase); and again in this example code.
13
+
10
14
Feel like supporting open source hardware?
11
15
Buy a board from SparkFun!
12
16
SparkFun Thing Plus - ESP32 WROOM: https://www.sparkfun.com/products/15663
@@ -49,6 +53,8 @@ void setup()
49
53
50
54
myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise
51
55
56
+
//myGNSS.enableDebugging(Serial, true); // Uncomment this line to see helpful debug messages on Serial
Copy file name to clipboardExpand all lines: examples/AssistNow/README.md
+30
Original file line number
Diff line number
Diff line change
@@ -174,3 +174,33 @@ AssistNow Autonomous is disabled by default. You can enable it by calling ```set
174
174
175
175
* set ```aopCfg``` to 1 to enable AssistNow Autonomous, or 0 to disable it
176
176
*```aopOrbMaxErr``` is used to set the 'lifetime' of the AssistNow data. It is recommended to set aopOrbMaxErr to 0 (the default value). This instructs the module to use the firmware default value that corresponds to a default orbit data validity of approximately three days (for GPS satellites observed once) and up to six days (for GPS and GLONASS satellites observed multiple times over a period of at least half a day).
177
+
178
+
Once AssistNow Autonomous is enabled, you can monitor its progress via the ```status``` field in the UBX-NAV-AOPSTATUS message. You can read the ```status``` by calling ```getAOPSTATUSstatus```. It will return zero when the AssistNow Autonomous data collection is complete. Non-zero values indicate that data collection is still in progress.
We have included full 'auto' support for UBX-NAV-AOPSTATUS, so you can have the message delivered periodically, add a callback for it, and/or log it to the file buffer:
The AssistNow Autonomous data is stored in the module's RAM memory. If that RAM is Battery-Backed - all SparkFun GNSS boards include battery back-up - then the data will be available after the module is powered down and powered back up again. However, you can also read (poll) the navigation database and store the contents in processor memory. ```readNavigationDatabase``` allows you to do that:
Data is written to ```dataBytes```. Set ```maxNumDataBytes``` to the (maximum) size of dataBytes. If the database exceeds maxNumDataBytes, the excess bytes will be lost.
199
+
200
+
```readNavigationDatabase``` returns the number of database bytes written to ```dataBytes```. The return value will be equal to ```maxNumDataBytes``` if excess data was received.
201
+
202
+
```readNavigationDatabase``` will timeout after ```maxWait``` milliseconds - in case the final UBX-MGA-ACK was missed.
203
+
204
+
You can then write the database back into the module using ```pushAssistNowData```. Don't forget to call ```setUTCTimeAssistance```_before_```pushAssistNowData```.
205
+
206
+
Note: UBX-MGA-DBD messages are only intended to be sent back to the same receiver that generated them. They are firmware-specific.
0 commit comments