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_Online/Example2_AssistNowOnline_TimeDelay/Example2_AssistNowOnline_TimeDelay.ino
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -109,9 +109,11 @@ void setup()
109
109
if(!getLocalTime(&timeinfo))
110
110
{
111
111
Serial.println("Failed to obtain time");
112
-
return;
113
112
}
114
-
Serial.println(&timeinfo, "Time is: %A, %B %d %Y %H:%M:%S");
113
+
else
114
+
{
115
+
Serial.println(&timeinfo, "Time is: %A, %B %d %Y %H:%M:%S");
Copy file name to clipboardExpand all lines: examples/AssistNow/README.md
+84Lines changed: 84 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ With AssistNow Online, an Internet connected host downloads assistance data from
10
10
11
11
Please see the [AssistNow_Online](./AssistNow_Online) examples for more details. These examples were written for the ESP32, but will run on other platforms too.
12
12
13
+
The new functions we've added to the library to support AssistNow Online are described [Code Support for AssistNow below](#Code-Support-for-AssistNow)
14
+
13
15
## AssistNow<sup>TM</sup> Offline
14
16
15
17
With the AssistNow Offline service, users can download long-term orbit data over the Internet at their convenience. The orbit data can be stored in the memory of the application processor. The function requires no connectivity at system start-up, enabling a position fix within seconds, even when no network is available. AssistNow Offline offers augmentation for up to 35 days.
@@ -18,6 +20,8 @@ Please see the [AssistNow_Offline](./AssistNow_Offline) examples for more detail
18
20
19
21
**Note: AssistNow Offline is not supported by the ZED-F9P. "The ZED-F9P supports AssistNow Online only."**
20
22
23
+
The new functions we've added to the library to support AssistNow Offline are described [Code Support for AssistNow below](#Code-Support-for-AssistNow)
24
+
21
25
## AssistNow<sup>TM</sup> Autonomous
22
26
23
27
AssistNow Autonomous provides aiding information without the need for a host or external network connection. Based on previous broadcast satellite ephemeris data downloaded to and stored by the GNSS receiver, AssistNow Autonomous automatically generates accurate predictions of satellite orbital data (“AssistNow Autonomous data”) that is usable for future GNSS position fixes.
@@ -33,6 +37,8 @@ AssistNow Autonomous offers augmentation for up to 6 days.
33
37
34
38
Please see the [AssistNow_Autonomous](./AssistNow_Autonomous) examples for more details.
35
39
40
+
The new functions we've added to the library to support AssistNow Autonomous are described [Code Support for AssistNow below](#Code-Support-for-AssistNow)
41
+
36
42
## AssistNow Service Token
37
43
38
44
To be able to use AssistNow Online or AssistNow Offline, you will need a token to access the u-blox Thingstream server.
@@ -55,3 +61,81 @@ The _free_ AssistNow Developer token entitles you to:
55
61
* CellLocate Developer: 5K free location requests per month. Capped.
56
62
57
63
The free token will expire after 90 days, but you can continue to use it beyond that by registering it on [Thingstream](https://portal.thingstream.io/).
64
+
65
+
## Code Support for AssistNow
66
+
67
+
```pushAssistNowData``` allows the AssistNow Online data or Offline data from the u-blox server to be pushed to the module. As the ESP32 HTTP GET function returns a ```String```, we've included overloaded functions which allow you to pass the data as a ```String``` or as ```const uint8_t *```.
```dataBytes``` is a pointer to the AssistNow Online data.
82
+
<br>
83
+
```numDataBytes``` is the length of the AssistNow Online data.
84
+
<br>
85
+
86
+
```pushAssistNowData``` pushes individual packets of data to the u-blox module. Sending all of the data contiguously would overload the module, so ```pushAssistNowData``` can either:
87
+
88
+
* insert a small delay between each packet (the default is 7ms)
89
+
* or use the ```UBX-MGA-ACK-DATA0``` acknowledgement message to acknowledge each packet
90
+
91
+
```mgaAck``` controls which method is used.
92
+
93
+
* if ```mgaAck``` is ```SFE_UBLOX_MGA_ASSIST_ACK_NO``` (**default**), a delay of ```maxWait``` milliseconds is inserted between eack packet. ```maxWait``` defaults to 7ms.
94
+
* if ```mgaAck``` is ```SFE_UBLOX_MGA_ASSIST_ACK_YES```, acknowledgement messages will be expected with a _timeout_ of ```maxWait``` milliseconds. The default timeout is again 7ms, but you can increase this if required by passing a larger value.
95
+
* if ```mgaAck``` is ```SFE_UBLOX_MGA_ASSIST_ACK_ENQUIRE```, the code will poll the module to enquire if the achnowledgement messages are enabled. If they are, they will be used. If not, a delay is used.
96
+
97
+
```setAckAiding``` enables or disables the acknowledgement messages. By default they are disabled. ```setAckAiding(1)``` will enable them. ```setAckAiding(0)``` will disable them again.
98
+
<br>
99
+
```getAckAiding``` returns 1 if the acknowledgement messages are enabled, 0 if they are disabled. 255 indicates an error or timeout.
100
+
<br>
101
+
102
+
AssistNow Online data is valid for 2-4 hours. 'Stale' data can be re-used but:
103
+
104
+
*```pushAssistNowData``` needs to be told to skip the time information contained in the AssistNow data
105
+
* the user needs to provide the module with UTC time separately
106
+
107
+
The ```skipTime``` parameter tells ```pushAssistNowData``` to skip any time information in the data. ```skipTime``` is bool. Set it to ```true``` to skip the time information.
108
+
<br>
109
+
UTC time can be pushed to the module first by calling ```setUTCTimeAssistance```:
Only the ```year```, ```month```, ```day```, ```hour```, ```minute``` and ```second``` parameters are mandatory. The others default to sensible values. Again ```mgaAck``` and ```maxWait``` control if a delay is used when configuring the time, or if an acknowledgement message will be expected.
114
+
<br>
115
+
```nanos``` (nanoseconds), ```tAccS``` (time accuracy estimate (seconds)), ```tAccNs``` (time accuracy estimate (nanoseconds)) and ```source``` (if a clock signal will be provided on EXT_INT) are optional, but are available for advanced users.
116
+
<br>
117
+
```year``` numbering starts at 0; 2021 is 2021, not 121 (years since 1900). ```month``` and ```day``` numbering starts at 1, not 0.
AssistNow Offline data downloaded from the u-blox server can contain 1-5 weeks of data. However, only the data for _today_ should be pushed the module. Sending data for past or future days will confuse the module.
125
+
```findMGAANOForDate``` can be used to find the location of the start of the UBX-MGA-ANO data for the specified date within the offline data. That location can then be passed to ```pushAssistNowData``` using the ```offset``` parameter.
* call ```findMGAANOForDate``` passing the ```year```, ```month``` and ```day``` for today. ```findMGAANOForDate``` will return the location / offset of the data for today within the offline data.
132
+
* call ```findMGAANOForDate``` again passing the ```year```, ```month``` and ```day``` for _today_ but also set ```daysIntoFuture``` to 1. ```findMGAANOForDate``` will then return the location / offset of the data for _tomorrow_ (one day into the future).
133
+
* call ```pushAssistNowData``` setting:
134
+
*```offset``` to the location (offset) of today's data within the offline data
135
+
*```skipTime``` to ```true```
136
+
*```numDataBytes``` to ((tomorrow's location) - (today's location)). Only the offline data for today will be pushed.
137
+
138
+
```findMGAANOForDate``` will return a value of numDataBytes if the data for the chosen day cannot be found.
0 commit comments