le_gnss_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_gnss GNSS
14  *
15  * @ref le_gnss_interface.h "API Reference" <br>
16  * @ref platformConstraintsGnss <br>
17  * @ref howToGNSS "How To Use GNSS" <br>
18  * @ref toolsTarget_gnss "GNSS target tool" <br>
19  *
20  * <HR>
21  *
22  * This API provides access to the GNSS device.
23  *
24  * GNSS or Global Navigation Satellite System is a satellite navigation system with global coverage.
25  *
26  * This API provides function to configure the GNSS device and retrieve position information.
27  *
28  * @section le_gnss_binding IPC interfaces binding
29  *
30  * All the functions of this API are provided by the @b positioningService application service.
31  *
32  * Here's a code sample binding to Positioning services:
33  * @verbatim
34  bindings:
35  {
36  clientExe.clientComponent.le_gnss -> positioningService.le_gnss
37  }
38  @endverbatim
39  *
40  * @section le_gnss_ControlApi GNSS Control API
41  *
42  * @subsection le_gnss_EnableDisable Enable/Disable GNSS device
43  *
44  * The application can enable/disable the GNSS device with the le_gnss_Enable()
45  * / le_gnss_Disable() functions.
46  * By default the GNSS device is enabled for the positioningService application service.
47  * Also see @ref howToGNSS.
48  *
49  * A sample code can be seen in the following page:
50  * - @subpage c_gnssSampleCodeEnableDisable
51  *
52  * @subsection le_gnss_StartStop Start/Stop GNSS device
53  *
54  * The application can start/stop the GNSS device with the le_gnss_Start() / le_gnss_Stop()
55  * functions.
56  * The default "HOT" start condition is applied and all assistance data are used.
57  * Also see @ref howToGNSS.
58  *
59  * A sample code can be seen in the following page:
60  * - @subpage c_gnssSampleCodeStartStop
61  *
62  * @subsubsection le_gnss_StartingMode Starting mode
63  *
64  * Starting modes are used only for test purposes and allow start performance measurement.
65  * @note For more information about start performances, please refer to your specific
66  * platform documentation.
67  *
68  * @subsubsection SettingConfiguration Setting configuration
69  *
70  * @warning The GNSS setting configuration depends on the platform. Please refer to
71  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
72  *
73  * @subsubsection le_gnss_Data GNSS data
74  * The following table describes the <b>minimum</b> required data for those starting modes:
75  *
76  * | GNSS Data / Starting mode | HOT | WARM | COLD | FACTORY |
77  *| -----------------------| -----| ------| ----- | ------- |
78  *| Broadcasted Ephemeris | Used | | | |
79  *| Extended Ephemeris | Used(1) | Used(2) | Used(2) | Removed (3) |
80  *| Approximate Time and Position | Used | Used | | |
81  *| Almanac | Used | Used | Used | Used (Factory) |
82  *
83  * For example, a requested HOT start without valid broadcasted ephemeris will be treated
84  * as a WARM start.
85  *
86  * @note (1) Extended Ephemeris can be used if Broadcasted Ephemeris are not valid.
87  * The Extended Ephemeris could be loaded using the le_gnss_LoadExtendedEphemerisFile()
88  * function.
89  * @note (2) Extended Ephemeris is used if the Extended Ephemeris file is loaded and valid.
90  * @note (3) Extended Ephemeris are removed when a FACTORY start is requested.
91  * The Extended Ephemeris could be loaded again using the le_gnss_LoadExtendedEphemerisFile()
92  * function.
93  *
94  * @subsubsection le_gnss_TTFF Time To First Fix (TTFF)
95  * The le_gnss_GetTtff() function provides the TTFF (first between 2-Dimensional or 3-Dimensional
96  * position fix) of the last position fix.
97  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
98  *
99  * A sample code can be seen in the following page:
100  * - @subpage c_gnssSampleCodeReStart
101  *
102  * @subsubsection le_gnss_InjectUtcTime Inject UTC time
103  * The le_gnss_InjectUtcTime() function injects the UTC time into the location engine. Providing an
104  * accurate UTC time reduces the time to find the first fix.
105  * @note It is mandatory to enable the 'Extended Ephemeris' file injection into the GNSS device with
106  * le_gnss_EnableExtendedEphemerisFile() before injecting time with le_gnss_InjectUtcTime API.
107  * @warning Your GNSS device may require a restart to take into account the enabling of the
108  * 'Extended Ephemeris' file injection.
109  * Please refer to your platform documentation @ref platformConstraintsGnss_SettingConfiguration for
110  * further details.
111  *
112  * @subsubsection le_gnss_ForceHotRestart Force HOT restart
113  * The le_gnss_ForceHotRestart() function performs a "HOT" restart of the GNSS device. The current
114  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
115  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
116  *
117  * @subsubsection le_gnss_ForceWarmRestart Force WARM restart
118  * The le_gnss_ForceWarmRestart() function performs a "WARM" restart of the GNSS device. The current
119  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
120  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
121  * @Note This API has a platform dependent feature. Please refer to
122  * @ref platformConstraintsGnss_WarmRestart for further details.
123  *
124  * @subsubsection le_gnss_ForceColdRestart Force COLD restart
125  * The le_gnss_ForceColdRestart() function performs a "COLD" restart of the GNSS device. The current
126  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
127  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
128  *
129  * @subsubsection le_gnss_ForceFactoryRestart Force FACTORY restart
130  * The le_gnss_ForceFactoryRestart() function performs a "FACTORY" restart of the GNSS device.
131  * The current GNSS session is stopped, then started using the available @ref le_gnss_Data.
132  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
133  *
134  * @subsection le_gnss_AcquisitionRate Acquisition rate
135  * The GNSS position is computed and delivered each acquisition rate. The acquisition rate defines
136  * the time interval that must elapse between two final GPS positions calculation and reports.
137  * Its default value is 1 second.
138  * The application can configure/retreive the GNSS device acquisition rate with the
139  * le_gnss_SetAcquisitionRate() / le_gnss_GetAcquisitionRate() functions.
140  *
141  * Please refer to @ref le_gnss_APIcallsRequirements.
142  *
143  * A sample code can be seen in the following page:
144  * - @subpage c_gnssSampleCodeAcquisitionRate
145  *
146  * @subsection le_gnss_SetGetConstellation GNSS constellation selection
147  *
148  * The le_gnss_SetConstellation() function selects the GNSS constellation(s) used in solution.
149  * If all GNSS constellations are disabled, the GNSS engine is disabled.
150  *
151  * @warning Your GNSS device may require a restart to take into account this change.
152  * Please refer to your platform documentation @ref platformConstraintsGnss_SettingConfiguration for
153  * further details.
154  *
155  * Combinations of constellation for GPS, GLONASS, BDS, GALILEO and QZSS satellites are currently
156  * supported. Constellation for SBAS satellites is not supported.
157  *
158  * All supported GNSS constellations are enabled by default.
159  * The le_gnss_GetConstellation() function gets the GNSS constellation(s) enabled to be used
160  * in solution.
161  *
162  * le_gnss_SetConstellationArea sets the area for a GNSS constellation. le_gnss_GetConstellationArea
163  * gets the area for a GNSS constellation.
164  *
165  * A sample code can be seen in the following page:
166  * - @subpage c_gnssSampleCodeConstellation
167  *
168  * @subsection le_gnss_SetGetMinElevation GNSS minimum elevation selection
169  *
170  * The le_gnss_SetMinElevation() function sets the GNSS minimum elevation.
171  * Satellites with elevation lower than the minimum elevation will be ignored.
172  *
173  * The le_gnss_GetMinElevation() function gets the GNSS minimum elevation.
174  *
175  * A sample code can be seen in the following page:
176  * - @subpage c_gnssSampleCodeMinElevation
177  *
178  * @subsection le_gnss_NmeaSentences NMEA sentences selection
179  *
180  * The le_gnss_SetNmeaSentences() function selects the enabled NMEA sentences in the
181  * @ref le_gnss_NMEA with a bit mask. The supported values are listed in @ref le_gnss_NmeaBitMask_t.
182  *
183  * @note This function may be subject to limitations depending on the platform. Please refer to the
184  * @ref platformConstraintsGnss page.
185  *
186  * @warning Your GNSS device may require a restart to take into account this change.
187  * Please refer to your platform documentation @ref platformConstraintsGnss_SettingConfiguration for
188  * further details.
189  *
190  * @warning Some NMEA sentences are unsupported depending on the plateform. Please refer to
191  * @ref platformConstraintsGnss_nmeaMask section for full details.
192  *
193  * @note All supported NMEA sentences are enabled by default.
194  *
195  * The le_gnss_GetNmeaSentences() function gets the bit mask of the enabled NMEA sentences in the
196  * @ref le_gnss_NMEA.
197  *
198  * Please refer to @ref le_gnss_APIcallsRequirements.
199  *
200  * A sample code can be seen in the following page:
201  * - @subpage c_gnssSampleCodeNmeaSentences
202  *
203  * @subsection le_gnss_APIcallsRequirements API calls Requirements
204  * The following table shows the pre-requisites when using the GNSS service API function set.
205  * ''LE_OK or error code'' means the function is authorized in the corresponding state, the request
206  * is performed and the result is returned; otherwise the returned error is indicated for each state
207  *.
208  * | Function / GNSS state | UNINITIALIZED | READY | ACTIVE | DISABLED |
209  *| ----------------------------- | --------------------------- | -----------------------------| --------------------------- | --------------------------- |
210  *| le_gnss_Start() | LE_NOT_PERMITTED | LE_OK or error code | LE_DUPLICATE | LE_NOT_PERMITTED |
211  *| le_gnss_Stop() | LE_NOT_PERMITTED | LE_DUPLICATE | LE_OK or error code | LE_NOT_PERMITTED |
212  *| le_gnss_ForceHotRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
213  *| le_gnss_ForceWarmRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
214  *| le_gnss_ForceColdRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
215  *| le_gnss_ForceFactoryRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
216  *| le_gnss_Disable() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_DUPLICATE |
217  *| le_gnss_Enable() | LE_NOT_PERMITTED | LE_DUPLICATE | LE_DUPLICATE | LE_OK or error code |
218  *| le_gnss_SetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
219  *| le_gnss_GetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
220  *| le_gnss_SetConstellationArea() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
221  *| le_gnss_GetConstellationArea() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
222  *| le_gnss_GetTtff() | LE_NOT_PERMITTED | LE_OK or error code | LE_OK or error code | LE_NOT_PERMITTED |
223  *| le_gnss_SetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
224  *| le_gnss_GetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
225  *| le_gnss_SetNmeaSentences() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
226  *| le_gnss_GetNmeaSentences() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
227  *
228  * Also see @ref howToGNSS.
229  *
230  * @section le_gnss_Information GNSS position information
231  * @ref le_gnss_NMEA
232  *
233  * @ref le_gnss_GetInfo
234  *
235  * @subsection le_gnss_NMEA NMEA Flow
236  * The National Marine Electronics Association (NMEA) standard defines an electrical interface
237  * and data protocol for communications between marine instrumentation.
238  *
239  * The NMEA-0183, scope of this document, defines a set of frame prefixed by
240  * $GP (concerning Global Positioning System),
241  * $GL (concerning GLONASS)
242  * and $GN (concerning combination of navigation systems).
243  * For more details about NMEA standards, please refer to http://www.nmea.org/.
244  *
245  * That NMEA frames flow can be retrieved from the "/dev/nmea" device folder, using for example
246  * the shell command $<EM> cat /dev/nmea | grep '$G'</EM>
247  *
248  * @subsection le_gnss_GetInfo Get position information
249  * The position information is referenced to a position sample object.
250  *
251  * An application can register a handler to be notified of the
252  * updated position each @ref le_gnss_AcquisitionRate, returning a position sample object.
253  *
254  * The GNSS information commonly used such as
255  * device state, position, time and date, satellites information and accuracy
256  * can be queried using the following functions:
257  * - le_gnss_GetState()
258  * - le_gnss_GetPositionState()
259  * - le_gnss_GetLocation()
260  * - le_gnss_GetAltitude()
261  * - le_gnss_GetDate()
262  * - le_gnss_GetTime()
263  * - le_gnss_GetGpsTime()
264  * - le_gnss_GetGpsLeapSeconds()
265  * - le_gnss_GetEpochTime()
266  * - le_gnss_GetTimeAccuracy()
267  * - le_gnss_GetHorizontalSpeed()
268  * - le_gnss_GetVerticalSpeed()
269  * - le_gnss_GetDirection()
270  * - le_gnss_GetSatellitesInfo()
271  * - le_gnss_GetSbasConstellationCategory()
272  * - le_gnss_GetSatellitesStatus()
273  * - le_gnss_GetDop()
274  * - le_gnss_GetDilutionOfPrecision()
275  * - le_gnss_GetAltitudeOnWgs84()
276  * - le_gnss_GetMagneticDeviation()
277  *
278  * The handler can be managed using le_gnss_AddPositionHandler()
279  * and le_gnss_RemovePositionHandler().
280  * When a position is computed, the handler is called.
281  *
282  * The application has to release each position sample object received by the handler,
283  * using the le_gnss_ReleaseSampleRef().
284  *
285  * A sample code can be seen in the following page:
286  * - @subpage c_gnssSampleCodePosition
287  *
288  * @section le_gnss_Assisted_GNSS Assisted GNSS
289  *
290  * @ref le_gnss_Assisted_GNSS_EE
291  * @ref le_gnss_Assisted_GNSS_UP
292  *
293  * @subsection le_gnss_Assisted_GNSS_EE Server based Extended Ephemeris
294  *
295  * @todo Add detailed documentation.
296  *
297  * With le_gnss_LoadExtendedEphemerisFile() , you can load an 'Extended Ephemeris' file into
298  * the GNSS device from the filesystem.
299  * You have to download the file before loading it.
300  * @warning Ensure to check that the downloaded file is supported for your specific platform.
301  *
302  * With le_gnss_GetExtendedEphemerisValidity(), you will to get the validity of the last injected
303  * Extended Ephemeris.
304  *
305  * You can enable/disable the use of the 'Extended Ephemeris' file into the GNSS device with
306  * le_gnss_EnableExtendedEphemerisFile() / le_gnss_DisableExtendedEphemerisFile() functions.
307  * @warning Ensure to check configuration capabilities for your specific platform.
308  * A reboot must be required if your platform doesn't allow run-time configuration.
309  *
310  * A sample code can be seen in the following page:
311  * - @subpage c_gnssSampleCodeXtra
312  *
313  * @subsection le_gnss_Assisted_GNSS_UP 3GPP User Plane (OMA SUPL)
314  *
315  * That 3GPP User Plane A-GNSS (Assisted GNSS) protocol is defined by two different standardization
316  * bodies, 3GPP and Open Mobile Alliance (OMA). For more information, please refer to the standard.
317  *
318  * Both MS-Assisted and MS-Based position determination methods are supported in the User Plane.
319  *
320  * In MS-Assisted mode, the MS (Mobile Station) measures the signals from the GNSS satellites
321  *, then returns the retrieved GNSS data to the SUPL (Secure User Plan Location) server, where the
322  * position calculation is performed.
323  *
324  * In MS-Based mode, the MS gets the assistance data from the SUPL (Secure User Plan Location)
325  * server. The MS measures the signals from the GNSS satellites and makes the position calculation.
326  *
327  * The data transport over User Plan is done using the TCP/IP protocol.
328  *
329  * The Assisted-GNSS mode can be configured thru the le_gnss_SetSuplAssistedMode() function.
330  *
331  * The supported modes are the following:
332  * - Standalone mode: That 3GPP User Plane A-GNSS feature is deactivated.
333  * - MS-Based mode
334  * - MS-Assisted mode
335  *
336  * Moreover, the le_gnss_GetSuplAssistedMode() function reads the configured Assisted-GNSS mode.
337  *
338  * The SUPL server is configured using the le_gnss_SetSuplServerUrl() function. That function sets
339  * the SUPL server URL and optionally the port number.
340  *
341  * The SUPL certificate to be used in A-GNSS sessions is injected through the
342  * le_gnss_InjectSuplCertificate() function and deleted through the le_gnss_DeleteSuplCertificate()
343  * function.
344  * The SUPL certificate lenght given as parameter to le_gnss_InjectSuplCertificate() must be less
345  * than LE_GNSS_SUPL_CERTIFICATE_MAX_LEN.
346  *
347  * <HR>
348  *
349  * Copyright (C) Sierra Wireless Inc.
350  */
351 /**
352  * @page c_gnssSampleCode Sample code for GNSS device
353  *
354  * @include "apps/test/positioning/gnssTest/gnssTest/gnssTest.c"
355  */
356 /**
357  * @page c_gnssSampleCodeEnableDisable Sample code for Enable/Disable GNSS device
358  *
359  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssEnable
360  */
361 /**
362  * @page c_gnssSampleCodeStartStop Sample code for Start/Stop GNSS device
363  *
364  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
365  */
366 /**
367  * @page c_gnssSampleCodeReStart Sample code for restart GNSS device and get TTFF
368  *
369  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssReStart
370  */
371 /**
372  * @page c_gnssSampleCodeAcquisitionRate Sample code for GNSS acquisition rate configuration
373  *
374  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
375  */
376 /**
377  * @page c_gnssSampleCodeConstellation Sample code for GNSS constellation selection
378  *
379  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
380  */
381 /**
382  * @page c_gnssSampleCodeMinElevation Sample code for GNSS minimum elevation
383  *
384  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
385  */
386 /**
387  * @page c_gnssSampleCodeNmeaSentences Sample code for GNSS NMEA sentences selection
388  *
389  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
390  */
391 /**
392  * @page c_gnssSampleCodePosition Sample code for GNSS position information
393  *
394  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssPosition
395  */
396 /**
397  * @page c_gnssSampleCodeXtra Sample code for GNSS Server based Extended Ephemeris
398  *
399  * @include "apps/test/positioning/gnssXtraTest/gnssXtraTest/xtraTest.c"
400  */
401 /**
402  * @file le_gnss_interface.h
403  *
404  * Legato @ref c_gnss include file.
405  *
406  * Copyright (C) Sierra Wireless Inc.
407  */
408 
409 #ifndef LE_GNSS_INTERFACE_H_INCLUDE_GUARD
410 #define LE_GNSS_INTERFACE_H_INCLUDE_GUARD
411 
412 
413 #include "legato.h"
414 
415 
416 //--------------------------------------------------------------------------------------------------
417 /**
418  * Type for handler called when a server disconnects.
419  */
420 //--------------------------------------------------------------------------------------------------
421 typedef void (*le_gnss_DisconnectHandler_t)(void *);
422 
423 //--------------------------------------------------------------------------------------------------
424 /**
425  *
426  * Connect the current client thread to the service providing this API. Block until the service is
427  * available.
428  *
429  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
430  * called before any other functions in this API. Normally, ConnectService is automatically called
431  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
432  *
433  * This function is created automatically.
434  */
435 //--------------------------------------------------------------------------------------------------
437 (
438  void
439 );
440 
441 //--------------------------------------------------------------------------------------------------
442 /**
443  *
444  * Try to connect the current client thread to the service providing this API. Return with an error
445  * if the service is not available.
446  *
447  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
448  * called before any other functions in this API. Normally, ConnectService is automatically called
449  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
450  *
451  * This function is created automatically.
452  *
453  * @return
454  * - LE_OK if the client connected successfully to the service.
455  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
456  * bound.
457  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
458  * - LE_COMM_ERROR if the Service Directory cannot be reached.
459  */
460 //--------------------------------------------------------------------------------------------------
462 (
463  void
464 );
465 
466 //--------------------------------------------------------------------------------------------------
467 /**
468  * Set handler called when server disconnection is detected.
469  *
470  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
471  * to continue without exiting, it should call longjmp() from inside the handler.
472  */
473 //--------------------------------------------------------------------------------------------------
475 (
476  le_gnss_DisconnectHandler_t disconnectHandler,
477  void *contextPtr
478 );
479 
480 //--------------------------------------------------------------------------------------------------
481 /**
482  *
483  * Disconnect the current client thread from the service providing this API.
484  *
485  * Normally, this function doesn't need to be called. After this function is called, there's no
486  * longer a connection to the service, and the functions in this API can't be used. For details, see
487  * @ref apiFilesC_client.
488  *
489  * This function is created automatically.
490  */
491 //--------------------------------------------------------------------------------------------------
493 (
494  void
495 );
496 
497 
498 //--------------------------------------------------------------------------------------------------
499 /**
500  * Maximum length of the SUP Server URL string.
501  */
502 //--------------------------------------------------------------------------------------------------
503 #define LE_GNSS_SUPL_SERVER_URL_MAX_LEN 256
504 
505 //--------------------------------------------------------------------------------------------------
506 /**
507  * Maximum length of the SUP Server URL string.
508  * One extra byte is added for the null character.
509  */
510 //--------------------------------------------------------------------------------------------------
511 #define LE_GNSS_SUPL_SERVER_URL_MAX_BYTES 257
512 
513 //--------------------------------------------------------------------------------------------------
514 /**
515  * Maximum SUPL certificate size.
516  */
517 //--------------------------------------------------------------------------------------------------
518 #define LE_GNSS_SUPL_CERTIFICATE_MAX_LEN 2000
519 
520 //--------------------------------------------------------------------------------------------------
521 /**
522  * Maximum SUPL certificate string size.
523  * One extra byte is added for the null character.
524  */
525 //--------------------------------------------------------------------------------------------------
526 #define LE_GNSS_SUPL_CERTIFICATE_MAX_BYTES 2001
527 
528 //--------------------------------------------------------------------------------------------------
529 /**
530  * Define the maximum length of the Satellites Vehicle information list
531  */
532 //--------------------------------------------------------------------------------------------------
533 #define LE_GNSS_SV_INFO_MAX_LEN 80
534 
535 //--------------------------------------------------------------------------------------------------
536 /**
537  * Define the maximal bit mask for enabled NMEA sentences
538  *
539  * @note This maximal value should be coherent with @ref le_gnss_NmeaBitMask_t
540  */
541 //--------------------------------------------------------------------------------------------------
542 #define LE_GNSS_NMEA_SENTENCES_MAX 4194303
543 
544 //--------------------------------------------------------------------------------------------------
545 /**
546  * @deprecated LE_GNSS_NMEA_MASK_PQXFI is deprecated. LE_GNSS_NMEA_MASK_PTYPE is to be used instead.
547  * LE_GNSS_NMEA_MASK_PTYPE supports all Proprietary type masks: PQXFI, PQGSA and PQGSV.
548  */
549 //--------------------------------------------------------------------------------------------------
550 #define LE_GNSS_NMEA_MASK_PQXFI 16384
551 
552 //--------------------------------------------------------------------------------------------------
553 /**
554  * Define the maximal degree for the minimal elevation
555  */
556 //--------------------------------------------------------------------------------------------------
557 #define LE_GNSS_MIN_ELEVATION_MAX_DEGREE 90
558 
559 //--------------------------------------------------------------------------------------------------
560 /**
561  * Satellite Vehicle (SV) ID to PRN offset definitions
562  *
563  * @note SV ID is given both in le_gnss_GetSatellitesInfo() API and NMEA flow. Its corresponding
564  * PRN code can be computed adding the following offset according to its constellation.
565  */
566 //--------------------------------------------------------------------------------------------------
567 #define LE_GNSS_PRN_OFFSET_GPS 0
568 
569 //--------------------------------------------------------------------------------------------------
570 /**
571  */
572 //--------------------------------------------------------------------------------------------------
573 #define LE_GNSS_PRN_OFFSET_SBAS 87
574 
575 //--------------------------------------------------------------------------------------------------
576 /**
577  */
578 //--------------------------------------------------------------------------------------------------
579 #define LE_GNSS_PRN_OFFSET_GLONASS -64
580 
581 //--------------------------------------------------------------------------------------------------
582 /**
583  */
584 //--------------------------------------------------------------------------------------------------
585 #define LE_GNSS_PRN_OFFSET_GALILEO -300
586 
587 //--------------------------------------------------------------------------------------------------
588 /**
589  */
590 //--------------------------------------------------------------------------------------------------
591 #define LE_GNSS_PRN_OFFSET_BEIDOU -200
592 
593 //--------------------------------------------------------------------------------------------------
594 /**
595  */
596 //--------------------------------------------------------------------------------------------------
597 #define LE_GNSS_PRN_OFFSET_QZSS 0
598 
599 //--------------------------------------------------------------------------------------------------
600 /**
601  * Reference type for dealing with GNSS position samples.
602  */
603 //--------------------------------------------------------------------------------------------------
604 typedef struct le_gnss_Sample* le_gnss_SampleRef_t;
605 
606 
607 //--------------------------------------------------------------------------------------------------
608 /**
609  * Enumeration for GNSS device state
610  */
611 //--------------------------------------------------------------------------------------------------
612 typedef enum
613 {
615  ///< The GNSS device is not initialized
617  ///< The GNSS device is ready
619  ///< The GNSS device is active
621  ///< The GNSS device is disabled
623  ///< Do not use
624 }
626 
627 
628 //--------------------------------------------------------------------------------------------------
629 /**
630  * GNSS fix position states.
631  */
632 //--------------------------------------------------------------------------------------------------
633 typedef enum
634 {
636  ///< The GNSS fix position is not fixed.
638  ///< 2-Dimensional position fix.
640  ///< 3-Dimensional position fix.
642  ///< Estimated (i.e. forward predicted) position fix.
643 }
645 
646 
647 //--------------------------------------------------------------------------------------------------
648 /**
649  * SBAS constellation category
650  */
651 //--------------------------------------------------------------------------------------------------
652 typedef enum
653 {
655  ///< Satellite Vehicle of Satellite-based augmentation system
656  ///< (SBAS) EGNOS constellation.
658  ///< Satellite Vehicle of Satellite-based augmentation system
659  ///< (SBAS) WAAS constellation.
661  ///< Satellite Vehicle of Satellite-based augmentation system
662  ///< (SBAS) GAGAN constellation.
664  ///< Satellite Vehicle of Satellite-based augmentation system
665  ///< (SBAS) MSAS constellation.
667  ///< Satellite Vehicle of Satellite-based augmentation system
668  ///< (SBAS) unknown constellation.
669 }
671 
672 
673 //--------------------------------------------------------------------------------------------------
674 /**
675  * GNSS constellation type.
676  */
677 //--------------------------------------------------------------------------------------------------
678 typedef enum
679 {
681  ///< GNSS constellation field not defined.
683  ///< Satellite Vehicle of GPS constellation.
684  ///< North American satellite navigation system
686  ///< Satellite Vehicle of SBAS constellation.
687  ///< Satellite-based augmentation system
689  ///< Satellite Vehicle of Glonass constellation.
690  ///< Russian satellite navigation system
692  ///< Satellite Vehicle of Galileo constellation.
693  ///< European Union satellite navigation system
695  ///< Satellite Vehicle of Beidou constellation.
696  ///< Chinese satellite navigation system
698  ///< Satellite Vehicle of QZSS constellation.
699  ///< Japanese satellite navigation system
701  ///< Maximum value.
702 }
704 
705 
706 //--------------------------------------------------------------------------------------------------
707 /**
708  * Assisted-GNSS mode
709  */
710 //--------------------------------------------------------------------------------------------------
711 typedef enum
712 {
714  ///< Standalone mode.
716  ///< MS-Based mode.
718  ///< MS-Assisted mode.
719 }
721 
722 
723 //--------------------------------------------------------------------------------------------------
724 /**
725  * Dilution of precision type
726  */
727 //--------------------------------------------------------------------------------------------------
728 typedef enum
729 {
731  ///< Position dilution of precision.
733  ///< Horizontal dilution of precision.
735  ///< Vertical dilution of precision.
737  ///< Geometric dilution of precision.
739  ///< Time dilution of precision.
740  LE_GNSS_DOP_LAST = 5
741  ///<
742 }
744 
745 
746 //--------------------------------------------------------------------------------------------------
747 /**
748  * GNSS constellation area type
749  */
750 //--------------------------------------------------------------------------------------------------
751 typedef enum
752 {
754  ///< Unset area.
756  ///< Worldwide area.
758  ///< Outside US area.
759 }
761 
762 
763 //--------------------------------------------------------------------------------------------------
764 /**
765  * GNSS constellation Bit Mask (8 bits) indicating the GNSS constellation(s)
766  * used in solution.
767  *
768  */
769 //--------------------------------------------------------------------------------------------------
770 typedef enum
771 {
772  LE_GNSS_CONSTELLATION_GPS = 0x1, ///< GPS constellation used in solution.
773  ///< North American satellite navigation system
774  LE_GNSS_CONSTELLATION_GLONASS = 0x2, ///< GLONASS constellation used in solution.
775  ///< Russian satellite navigation system
776  LE_GNSS_CONSTELLATION_BEIDOU = 0x4, ///< BEIDOU constellation used in solution.
777  ///< Chinese satellite navigation system
778  LE_GNSS_CONSTELLATION_GALILEO = 0x8, ///< GALILEO constellation used in solution.
779  ///< European Union satellite navigation system
780  LE_GNSS_CONSTELLATION_SBAS = 0x10, ///< SBAS constellation used in solution.
781  LE_GNSS_CONSTELLATION_QZSS = 0x20 ///< QZSS constellation used in solution.
782  ///< Japanese satellite navigation system
783 }
785 
786 
787 //--------------------------------------------------------------------------------------------------
788 /**
789  * NMEA sentences Bit Mask indicating the NMEA sentences enabled in the NMEA flow.
790  *
791  * @warning The supported NMEA sentences depend on the platform. Please refer to your platform
792  * documentation for further details.
793  *
794  * @note The bit mask values should be coherent with @ref LE_GNSS_NMEA_SENTENCES_MAX
795  */
796 //--------------------------------------------------------------------------------------------------
797 typedef enum
798 {
799  LE_GNSS_NMEA_MASK_GPGGA = 0x1, ///< GPGGA type enabled: GPS fix data.
800  LE_GNSS_NMEA_MASK_GPGSA = 0x2, ///< GPGSA type enabled: GPS DOP and active satellites.
801  LE_GNSS_NMEA_MASK_GPGSV = 0x4, ///< GPGSV type enabled: GPS satellites in view.
802  LE_GNSS_NMEA_MASK_GPRMC = 0x8, ///< GPRMC type enabled: GPS recommended minimum data.
803  LE_GNSS_NMEA_MASK_GPVTG = 0x10, ///< GPVTG type enabled: GPS vector track and speed over the ground.
804  LE_GNSS_NMEA_MASK_GLGSV = 0x20, ///< GLGSV type enabled: GLONASS satellites in view.
805  LE_GNSS_NMEA_MASK_GNGNS = 0x40, ///< GNGNS type enabled: GNSS fix data.
806  LE_GNSS_NMEA_MASK_GNGSA = 0x80, ///< GNGSA type enabled: GNSS DOP and active satellites.
807  LE_GNSS_NMEA_MASK_GAGGA = 0x100, ///< GAGGA type enabled: Galileo fix data.
808  LE_GNSS_NMEA_MASK_GAGSA = 0x200, ///< GAGSA type enabled: Galileo DOP and active satellites.
809  LE_GNSS_NMEA_MASK_GAGSV = 0x400, ///< GAGSV type enabled: Galileo satellites in view.
810  LE_GNSS_NMEA_MASK_GARMC = 0x800, ///< GARMC type enabled: Galileo recommended minimum data.
811  LE_GNSS_NMEA_MASK_GAVTG = 0x1000, ///< GAVTG type enabled: Galileo vector track and speed over the ground.
812  LE_GNSS_NMEA_MASK_PSTIS = 0x2000, ///< PSTIS type enabled: GPS session start indication.
813  LE_GNSS_NMEA_MASK_REMOVED = 0x4000, ///<
814  LE_GNSS_NMEA_MASK_PTYPE = 0x8000, ///< PTYPE type enabled: Proprietary Type mask.
815  LE_GNSS_NMEA_MASK_GPGRS = 0x10000, ///< GPGRS type enabled: GPS Range residuals.
816  LE_GNSS_NMEA_MASK_GPGLL = 0x20000, ///< GPGLL type enabled: GPS Geographic position, latitude / longitude.
817  LE_GNSS_NMEA_MASK_DEBUG = 0x40000, ///< DEBUG type enabled: Debug NMEA indication.
818  LE_GNSS_NMEA_MASK_GPDTM = 0x80000, ///< GPDTM type enabled: Local geodetic datum and datum offset from
819  LE_GNSS_NMEA_MASK_GAGNS = 0x100000 ///< GAGNS type enabled: Fix data for Galileo.
820 }
822 
823 
824 //--------------------------------------------------------------------------------------------------
825 /**
826  * Reference type used by Add/Remove functions for EVENT 'le_gnss_Position'
827  */
828 //--------------------------------------------------------------------------------------------------
829 typedef struct le_gnss_PositionHandler* le_gnss_PositionHandlerRef_t;
830 
831 
832 //--------------------------------------------------------------------------------------------------
833 /**
834  * Handler for position information.
835  *
836  */
837 //--------------------------------------------------------------------------------------------------
838 typedef void (*le_gnss_PositionHandlerFunc_t)
839 (
840  le_gnss_SampleRef_t positionSampleRef,
841  ///< Position's sample reference
842  void* contextPtr
843  ///<
844 );
845 
846 //--------------------------------------------------------------------------------------------------
847 /**
848  * Set the GNSS constellation bit mask
849  *
850  * @return
851  * - LE_FAULT The function failed.
852  * - LE_UNSUPPORTED If the request is not supported.
853  * - LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
854  * - LE_OK The function succeeded.
855  *
856  * @warning The settings are platform dependent. Please refer to
857  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
858  */
859 //--------------------------------------------------------------------------------------------------
861 (
862  le_gnss_ConstellationBitMask_t constellationMask
863  ///< [IN] GNSS constellation used in solution.
864 );
865 
866 //--------------------------------------------------------------------------------------------------
867 /**
868  * Get the GNSS constellation bit mask
869  *
870  * @return
871  * - LE_OK on success
872  * - LE_FAULT on failure
873  */
874 //--------------------------------------------------------------------------------------------------
876 (
877  le_gnss_ConstellationBitMask_t* constellationMaskPtr
878  ///< [OUT] GNSS constellation used in solution.
879 );
880 
881 //--------------------------------------------------------------------------------------------------
882 /**
883  * Set the area for the GNSS constellation
884  *
885  * @return
886  * - LE_OK The function succeeded.
887  * - LE_FAULT The function failed.
888  * - LE_UNSUPPORTED If the request is not supported.
889  * - LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
890  * - LE_BAD_PARAMETER Invalid constellation area.
891  *
892  * @warning The settings are platform dependent. Please refer to
893  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
894  */
895 //--------------------------------------------------------------------------------------------------
897 (
898  le_gnss_Constellation_t satConstellation,
899  ///< [IN] GNSS constellation type.
900  le_gnss_ConstellationArea_t constellationArea
901  ///< [IN] GNSS constellation area.
902 );
903 
904 //--------------------------------------------------------------------------------------------------
905 /**
906  * Get the area for the GNSS constellation
907  *
908  * @return
909  * - LE_OK On success
910  * - LE_FAULT On failure
911  * - LE_UNSUPPORTED Request not supported
912  * - LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
913  */
914 //--------------------------------------------------------------------------------------------------
916 (
917  le_gnss_Constellation_t satConstellation,
918  ///< [IN] GNSS constellation type.
919  le_gnss_ConstellationArea_t* constellationAreaPtr
920  ///< [OUT] GNSS constellation area.
921 );
922 
923 //--------------------------------------------------------------------------------------------------
924 /**
925  * This function enables the use of the 'Extended Ephemeris' file into the GNSS device.
926  *
927  * @return
928  * - LE_FAULT The function failed.
929  * - LE_OK The function succeeded.
930  *
931  * @warning The settings are platform dependent. Please refer to
932  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
933  */
934 //--------------------------------------------------------------------------------------------------
936 (
937  void
938 );
939 
940 //--------------------------------------------------------------------------------------------------
941 /**
942  * This function disables the use of the 'Extended Ephemeris' file into the GNSS device.
943  *
944  * @return
945  * - LE_FAULT The function failed.
946  * - LE_OK The function succeeded.
947  *
948  * @warning The settings are platform dependent. Please refer to
949  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
950  */
951 //--------------------------------------------------------------------------------------------------
953 (
954  void
955 );
956 
957 //--------------------------------------------------------------------------------------------------
958 /**
959  * This function must be called to load an 'Extended Ephemeris' file into the GNSS device.
960  *
961  * @return
962  * - LE_FAULT The function failed to inject the 'Extended Ephemeris' file.
963  * - LE_TIMEOUT A time-out occurred.
964  * - LE_FORMAT_ERROR 'Extended Ephemeris' file format error.
965  * - LE_OK The function succeeded.
966  *
967  */
968 //--------------------------------------------------------------------------------------------------
970 (
971  int fd
972  ///< [IN] Extended ephemeris file descriptor
973 );
974 
975 //--------------------------------------------------------------------------------------------------
976 /**
977  * This function must be called to get the validity of the last injected Extended Ephemeris.
978  *
979  * @return
980  * - LE_FAULT The function failed to get the validity
981  * - LE_OK The function succeeded.
982  *
983  */
984 //--------------------------------------------------------------------------------------------------
986 (
987  uint64_t* startTimePtr,
988  ///< [OUT] Start time in seconds (since Jan. 1, 1970)
989  uint64_t* stopTimePtr
990  ///< [OUT] Stop time in seconds (since Jan. 1, 1970)
991 );
992 
993 //--------------------------------------------------------------------------------------------------
994 /**
995  * This function must be called to inject the UTC time into the GNSS device.
996  *
997  * @return
998  * - LE_OK The function succeeded.
999  * - LE_FAULT The function failed to inject the UTC time.
1000  * - LE_TIMEOUT A time-out occurred.
1001  *
1002  * @note It is mandatory to enable the 'Extended Ephemeris' file injection into the GNSS device with
1003  * le_gnss_EnableExtendedEphemerisFile() before injecting time with this API.
1004  */
1005 //--------------------------------------------------------------------------------------------------
1007 (
1008  uint64_t timeUtc,
1009  ///< [IN] [IN] UTC time since Jan. 1, 1970 in milliseconds
1010  uint32_t timeUnc
1011  ///< [IN] [IN] Time uncertainty in milliseconds
1012 );
1013 
1014 //--------------------------------------------------------------------------------------------------
1015 /**
1016  * This function starts the GNSS device.
1017  *
1018  * @return
1019  * - LE_FAULT The function failed.
1020  * - LE_DUPLICATE If the GNSS device is already started.
1021  * - LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
1022  * - LE_OK The function succeeded.
1023  *
1024  */
1025 //--------------------------------------------------------------------------------------------------
1027 (
1028  void
1029 );
1030 
1031 //--------------------------------------------------------------------------------------------------
1032 /**
1033  * This function stops the GNSS device.
1034  *
1035  * @return
1036  * - LE_FAULT The function failed.
1037  * - LE_DUPLICATE If the GNSS device is already stopped.
1038  * - LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
1039  * - LE_OK The function succeeded.
1040  *
1041  */
1042 //--------------------------------------------------------------------------------------------------
1044 (
1045  void
1046 );
1047 
1048 //--------------------------------------------------------------------------------------------------
1049 /**
1050  * This function performs a "HOT" restart of the GNSS device.
1051  *
1052  * @return
1053  * - LE_FAULT The function failed.
1054  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
1055  * - LE_OK The function succeeded.
1056  *
1057  */
1058 //--------------------------------------------------------------------------------------------------
1060 (
1061  void
1062 );
1063 
1064 //--------------------------------------------------------------------------------------------------
1065 /**
1066  * This function performs a "WARM" restart of the GNSS device.
1067  *
1068  * @return
1069  * - LE_FAULT The function failed.
1070  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
1071  * - LE_OK The function succeeded.
1072  *
1073  * @Note This API has a platform dependent feature. Please refer to
1074  * @ref platformConstraintsGnss_WarmRestart for further details.
1075  */
1076 //--------------------------------------------------------------------------------------------------
1078 (
1079  void
1080 );
1081 
1082 //--------------------------------------------------------------------------------------------------
1083 /**
1084  * This function performs a "COLD" restart of the GNSS device.
1085  *
1086  * @return
1087  * - LE_FAULT The function failed.
1088  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
1089  * - LE_OK The function succeeded.
1090  *
1091  */
1092 //--------------------------------------------------------------------------------------------------
1094 (
1095  void
1096 );
1097 
1098 //--------------------------------------------------------------------------------------------------
1099 /**
1100  * This function performs a "FACTORY" restart of the GNSS device.
1101  *
1102  * @return
1103  * - LE_FAULT The function failed.
1104  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
1105  * - LE_OK The function succeeded.
1106  *
1107  */
1108 //--------------------------------------------------------------------------------------------------
1110 (
1111  void
1112 );
1113 
1114 //--------------------------------------------------------------------------------------------------
1115 /**
1116  * Get the TTFF in milliseconds
1117  *
1118  * @return
1119  * - LE_BUSY The position is not fixed and TTFF can't be measured.
1120  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
1121  * - LE_OK Function succeeded.
1122  * - LE_FAULT If there are some other errors.
1123  *
1124  */
1125 //--------------------------------------------------------------------------------------------------
1127 (
1128  uint32_t* ttffPtr
1129  ///< [OUT] TTFF in milliseconds
1130 );
1131 
1132 //--------------------------------------------------------------------------------------------------
1133 /**
1134  * This function enables the GNSS device.
1135  *
1136  * @return
1137  * - LE_FAULT The function failed.
1138  * - LE_DUPLICATE If the GNSS device is already enabled.
1139  * - LE_NOT_PERMITTED If the GNSS device is not initialized.
1140  * - LE_OK The function succeeded.
1141  *
1142  * @warning The settings are platform dependent. Please refer to
1143  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1144  */
1145 //--------------------------------------------------------------------------------------------------
1147 (
1148  void
1149 );
1150 
1151 //--------------------------------------------------------------------------------------------------
1152 /**
1153  * This function disables the GNSS device.
1154  *
1155  * @return
1156  * - LE_FAULT The function failed.
1157  * - LE_DUPLICATE If the GNSS device is already disabled.
1158  * - LE_NOT_PERMITTED If the GNSS device is not initialized or started.
1159  * - LE_OK The function succeeded.
1160  *
1161  * @warning The settings are platform dependent. Please refer to
1162  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1163  */
1164 //--------------------------------------------------------------------------------------------------
1166 (
1167  void
1168 );
1169 
1170 //--------------------------------------------------------------------------------------------------
1171 /**
1172  * This function sets the GNSS device acquisition rate.
1173  *
1174  * @return
1175  * - LE_OK on success
1176  * - LE_FAULT on failure
1177  * - LE_UNSUPPORTED request not supported
1178  * - LE_TIMEOUT a time-out occurred
1179  * - LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
1180  * - LE_OUT_OF_RANGE if acquisition rate value is equal to zero
1181  *
1182  * @warning This function may be subject to limitations depending on the platform. Please refer to
1183  * the @ref platformConstraintsGnss page.
1184  *
1185  * @warning The settings are platform dependent. Please refer to
1186  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1187  */
1188 //--------------------------------------------------------------------------------------------------
1190 (
1191  uint32_t rate
1192  ///< [IN] Acquisition rate in milliseconds.
1193 );
1194 
1195 //--------------------------------------------------------------------------------------------------
1196 /**
1197  * This function gets the GNSS device acquisition rate.
1198  *
1199  * @return
1200  * - LE_OK on success
1201  * - LE_FAULT on failure
1202  * - LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
1203  */
1204 //--------------------------------------------------------------------------------------------------
1206 (
1207  uint32_t* ratePtr
1208  ///< [OUT] Acquisition rate in milliseconds.
1209 );
1210 
1211 //--------------------------------------------------------------------------------------------------
1212 /**
1213  * Add handler function for EVENT 'le_gnss_Position'
1214  *
1215  * This event provides information on position.
1216  *
1217  * - A handler reference, which is only needed for later removal of the handler.
1218  *
1219  * @note Doesn't return on failure, so there's no need to check the return value for errors.
1220  */
1221 //--------------------------------------------------------------------------------------------------
1223 (
1224  le_gnss_PositionHandlerFunc_t handlerPtr,
1225  ///< [IN]
1226  void* contextPtr
1227  ///< [IN]
1228 );
1229 
1230 //--------------------------------------------------------------------------------------------------
1231 /**
1232  * Remove handler function for EVENT 'le_gnss_Position'
1233  */
1234 //--------------------------------------------------------------------------------------------------
1236 (
1237  le_gnss_PositionHandlerRef_t handlerRef
1238  ///< [IN]
1239 );
1240 
1241 //--------------------------------------------------------------------------------------------------
1242 /**
1243  * This function gets the position sample's fix state
1244  *
1245  * - LE_OK on success
1246  * - LE_FAULT on failure
1247  *
1248  * @note If the caller is passing an invalid Position sample reference into this function,
1249  * it is a fatal error, the function will not return.
1250  */
1251 //--------------------------------------------------------------------------------------------------
1253 (
1254  le_gnss_SampleRef_t positionSampleRef,
1255  ///< [IN] Position sample's reference.
1256  le_gnss_FixState_t* statePtr
1257  ///< [OUT] Position fix state.
1258 );
1259 
1260 //--------------------------------------------------------------------------------------------------
1261 /**
1262  * Get the location's data (Latitude, Longitude, Horizontal accuracy).
1263  *
1264  * @return
1265  * - LE_FAULT Function failed to get the location's data
1266  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
1267  * - LE_OK Function succeeded.
1268  *
1269  * @note latitudePtr, longitudePtr and hAccuracyPtr can be set to NULL if not needed.
1270  *
1271  * @note The latitude and longitude values are based on the WGS84 standard coordinate system.
1272  *
1273  * @note The latitude and longitude values are given in degrees with 6 decimal places like:
1274  * Latitude +48858300 = 48.858300 degrees North
1275  * Longitude +2294400 = 2.294400 degrees East
1276  * (The latitude and longitude values are given in degrees, minutes, seconds in NMEA frame)
1277  *
1278  * @note If the caller is passing an invalid Position sample reference into this function,
1279  * it is a fatal error, the function will not return.
1280  */
1281 //--------------------------------------------------------------------------------------------------
1283 (
1284  le_gnss_SampleRef_t positionSampleRef,
1285  ///< [IN] Position sample's reference.
1286  int32_t* latitudePtr,
1287  ///< [OUT] WGS84 Latitude in degrees, positive North [resolution 1e-6].
1288  int32_t* longitudePtr,
1289  ///< [OUT] WGS84 Longitude in degrees, positive East [resolution 1e-6].
1290  int32_t* hAccuracyPtr
1291  ///< [OUT] Horizontal position's accuracy in meters [resolution 1e-2].
1292 );
1293 
1294 //--------------------------------------------------------------------------------------------------
1295 /**
1296  * Get the position sample's altitude.
1297  *
1298  * @return
1299  * - LE_FAULT Function failed to get the altitude. Invalid Position reference provided.
1300  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
1301  * - LE_OK Function succeeded.
1302  *
1303  * @note Altitude is in meters, above Mean Sea Level, with 3 decimal places (3047 = 3.047 meters).
1304  *
1305  * @note For a 2D position fix, the altitude will be indicated as invalid and set to INT32_MAX
1306  *
1307  * @note Vertical position accuracy is in meters with 1 decimal places (3047 = 3.0 meters).
1308  *
1309  * @note If the caller is passing an invalid Position reference into this function,
1310  * it is a fatal error, the function will not return.
1311  *
1312  * @note altitudePtr, altitudeAccuracyPtr can be set to NULL if not needed.
1313  */
1314 //--------------------------------------------------------------------------------------------------
1316 (
1317  le_gnss_SampleRef_t positionSampleRef,
1318  ///< [IN] Position sample's reference.
1319  int32_t* altitudePtr,
1320  ///< [OUT] Altitude in meters, above Mean Sea Level [resolution 1e-3].
1321  int32_t* vAccuracyPtr
1322  ///< [OUT] Vertical position's accuracy in meters [resolution 1e-1].
1323 );
1324 
1325 //--------------------------------------------------------------------------------------------------
1326 /**
1327  * Get the position sample's time.
1328  *
1329  * @return
1330  * - LE_FAULT Function failed to get the time.
1331  * - LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
1332  * - LE_OK Function succeeded.
1333  *
1334  * @note If the caller is passing an invalid Position sample reference into this function,
1335  * it is a fatal error, the function will not return.
1336  */
1337 //--------------------------------------------------------------------------------------------------
1339 (
1340  le_gnss_SampleRef_t positionSampleRef,
1341  ///< [IN] Position sample's reference.
1342  uint16_t* hoursPtr,
1343  ///< [OUT] UTC Hours into the day [range 0..23].
1344  uint16_t* minutesPtr,
1345  ///< [OUT] UTC Minutes into the hour [range 0..59].
1346  uint16_t* secondsPtr,
1347  ///< [OUT] UTC Seconds into the minute [range 0..59].
1348  uint16_t* millisecondsPtr
1349  ///< [OUT] UTC Milliseconds into the second [range 0..999].
1350 );
1351 
1352 //--------------------------------------------------------------------------------------------------
1353 /**
1354  * Get the position sample's GPS time.
1355  *
1356  * @return
1357  * - LE_FAULT Function failed to get the time.
1358  * - LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
1359  * - LE_OK Function succeeded.
1360  *
1361  * @note If the caller is passing an invalid Position sample reference into this function,
1362  * it is a fatal error, the function will not return.
1363  */
1364 //--------------------------------------------------------------------------------------------------
1366 (
1367  le_gnss_SampleRef_t positionSampleRef,
1368  ///< [IN] Position sample's reference.
1369  uint32_t* gpsWeekPtr,
1370  ///< [OUT] GPS week number from midnight, Jan. 6, 1980.
1371  uint32_t* gpsTimeOfWeekPtr
1372  ///< [OUT] Amount of time in milliseconds into the GPS week.
1373 );
1374 
1375 //--------------------------------------------------------------------------------------------------
1376 /**
1377  * Get the position sample's epoch time.
1378  *
1379  * @return
1380  * - LE_FAULT Function failed to acquire the epoch time.
1381  * - LE_OK Function succeeded.
1382  * - LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
1383  *
1384  * @note The epoch time is the number of seconds elapsed since January 1, 1970
1385  * (midnight UTC/GMT), not counting leaps seconds.
1386  *
1387  * @note If the caller is passing an invalid position sample reference into this function,
1388  * it is a fatal error, the function will not return.
1389  */
1390 //--------------------------------------------------------------------------------------------------
1392 (
1393  le_gnss_SampleRef_t positionSampleRef,
1394  ///< [IN] Position sample's reference.
1395  uint64_t* millisecondsPtr
1396  ///< [OUT] Milliseconds since Jan. 1, 1970.
1397 );
1398 
1399 //--------------------------------------------------------------------------------------------------
1400 /**
1401  * Get the position sample's time accurary.
1402  *
1403  * @return
1404  * - LE_FAULT Function failed to get the time.
1405  * - LE_OUT_OF_RANGE The retrieved time accuracy is invalid (set to UINT16_MAX).
1406  * - LE_OK Function succeeded.
1407  *
1408  * @note If the caller is passing an invalid Position sample reference into this function,
1409  * it is a fatal error, the function will not return.
1410  */
1411 //--------------------------------------------------------------------------------------------------
1413 (
1414  le_gnss_SampleRef_t positionSampleRef,
1415  ///< [IN] Position sample's reference.
1416  uint32_t* timeAccuracyPtr
1417  ///< [OUT] Estimated time accuracy in nanoseconds
1418 );
1419 
1420 //--------------------------------------------------------------------------------------------------
1421 /**
1422  * Get the position sample's UTC leap seconds in advance
1423  *
1424  * @return
1425  * - LE_FAULT Function failed to get the leap seconds.
1426  * - LE_OUT_OF_RANGE The retrieved time accuracy is invalid (set to UINT8_MAX).
1427  * - LE_OK Function succeeded.
1428  *
1429  * @note The leap seconds in advance is the accumulated time in seconds since the start of GPS Epoch
1430  * time (Jan 6, 1980). This value has to be added to the UTC time (since Jan. 1, 1970)
1431  *
1432  * @note Insertion of each UTC leap second is usually decided about six months in advance by the
1433  * International Earth Rotation and Reference Systems Service (IERS).
1434  *
1435  * @note If the caller is passing an invalid position sample reference or a null pointer into this
1436  * function, it is a fatal error, the function will not return.
1437  */
1438 //--------------------------------------------------------------------------------------------------
1440 (
1441  le_gnss_SampleRef_t positionSampleRef,
1442  ///< [IN] Position sample's reference.
1443  uint8_t* leapSecondsPtr
1444  ///< [OUT] UTC leap seconds in advance in seconds
1445 );
1446 
1447 //--------------------------------------------------------------------------------------------------
1448 /**
1449  * Get the position sample's date.
1450  *
1451  * @return
1452  * - LE_FAULT Function failed to get the date.
1453  * - LE_OUT_OF_RANGE The retrieved date is invalid (all fields are set to 0).
1454  * - LE_OK Function succeeded.
1455  *
1456  * @note If the caller is passing an invalid Position sample reference into this function,
1457  * it is a fatal error, the function will not return.
1458  */
1459 //--------------------------------------------------------------------------------------------------
1461 (
1462  le_gnss_SampleRef_t positionSampleRef,
1463  ///< [IN] Position sample's reference.
1464  uint16_t* yearPtr,
1465  ///< [OUT] UTC Year A.D. [e.g. 2014].
1466  uint16_t* monthPtr,
1467  ///< [OUT] UTC Month into the year [range 1...12].
1468  uint16_t* dayPtr
1469  ///< [OUT] UTC Days into the month [range 1...31].
1470 );
1471 
1472 //--------------------------------------------------------------------------------------------------
1473 /**
1474  * Get the position sample's horizontal speed.
1475  *
1476  * - LE_FAULT Function failed to find the positionSample.
1477  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to UINT32_MAX).
1478  * - LE_OK Function succeeded.
1479  *
1480  * @note hSpeedPtr, hSpeedAccuracyPtr can be set to NULL if not needed.
1481  *
1482  * @note Horizontal speed is in meters/second with 2 decimal places (3047 = 30.47 meters/second).
1483  *
1484  * @note Horizontal speed accuracy estimate is in meters/second with 1 decimal place
1485  * (304 = 30.4 meters/second).
1486  *
1487  * @note If the caller is passing an invalid Position sample reference into this function,
1488  * it is a fatal error, the function will not return.
1489  *
1490  * @warning The Horizontal speed accuracy is platform dependent. Please refer to
1491  * @ref platformConstraintsGnss_speedAccuracies section for full details.
1492  */
1493 //--------------------------------------------------------------------------------------------------
1495 (
1496  le_gnss_SampleRef_t positionSampleRef,
1497  ///< [IN] Position sample's reference.
1498  uint32_t* hspeedPtr,
1499  ///< [OUT] Horizontal speed in meters/second [resolution 1e-2].
1500  uint32_t* hspeedAccuracyPtr
1501  ///< [OUT] Horizontal speed's accuracy estimate
1502  ///< in meters/second [resolution 1e-1].
1503 );
1504 
1505 //--------------------------------------------------------------------------------------------------
1506 /**
1507  * Get the position sample's vertical speed.
1508  *
1509  * @return
1510  * - LE_FAULT The function failed to find the positionSample.
1511  * - LE_OUT_OF_RANGE One of the retrieved parameter is not valid (set to INT32_MAX).
1512  * - LE_OK The function succeeded.
1513  *
1514  * @note vSpeedPtr, vSpeedAccuracyPtr can be set to NULL if not needed.
1515  *
1516  * @note For a 2D position Fix, the vertical speed will be indicated as invalid
1517  * and set to INT32_MAX.
1518  *
1519  * @note If the caller is passing an invalid Position sample reference into this function,
1520  * it is a fatal error, the function will not return.
1521  *
1522  * @warning The Vertical speed accuracy is platform dependent. Please refer to
1523  * @ref platformConstraintsGnss_speedAccuracies section for full details.
1524  */
1525 //--------------------------------------------------------------------------------------------------
1527 (
1528  le_gnss_SampleRef_t positionSampleRef,
1529  ///< [IN] Position sample's reference.
1530  int32_t* vspeedPtr,
1531  ///< [OUT] Vertical speed in meters/second [resolution 1e-2],
1532  ///< positive up.
1533  int32_t* vspeedAccuracyPtr
1534  ///< [OUT] Vertical speed's accuracy estimate
1535  ///< in meters/second [resolution 1e-1].
1536 );
1537 
1538 //--------------------------------------------------------------------------------------------------
1539 /**
1540  * Get the position sample's direction. Direction of movement is the direction that the vehicle or
1541  * person is actually moving.
1542  *
1543  * @return
1544  * - LE_FAULT Function failed to find the positionSample.
1545  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to UINT32_MAX).
1546  * - LE_OK Function succeeded.
1547  *
1548  * @note Direction and direction accuracy are given in degrees with 1 decimal place: 1755 = 175.5
1549  * degrees.
1550  * Direction ranges from 0 to 359.9 degrees, where 0 is True North.
1551  *
1552  * @note directionPtr, directionAccuracyPtr can be set to NULL if not needed.
1553  *
1554  * @note If the caller is passing an invalid Position sample reference into this function,
1555  * it is a fatal error, the function will not return.
1556  */
1557 //--------------------------------------------------------------------------------------------------
1559 (
1560  le_gnss_SampleRef_t positionSampleRef,
1561  ///< [IN] Position sample's reference.
1562  uint32_t* directionPtr,
1563  ///< [OUT] Direction in degrees [resolution 1e-1].
1564  ///< Range: 0 to 359.9, where 0 is True North
1565  uint32_t* directionAccuracyPtr
1566  ///< [OUT] Direction's accuracy estimate
1567  ///< in degrees [resolution 1e-1].
1568 );
1569 
1570 //--------------------------------------------------------------------------------------------------
1571 /**
1572  * Get the Satellites Vehicle information.
1573  *
1574  * @return
1575  * - LE_FAULT Function failed to find the positionSample.
1576  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid.
1577  * - LE_OK Function succeeded.
1578  *
1579  * @note satId[] can be set to 0 if that information list index is not configured, so
1580  * all satellite parameters (satConst[], satSnr[],satAzim[], satElev[]) are fixed to 0.
1581  *
1582  * @note For LE_OUT_OF_RANGE returned code, invalid value depends on field type:
1583  * UINT16_MAX for satId, LE_GNSS_SV_CONSTELLATION_UNDEFINED for satConst, false for satUsed,
1584  * UINT8_MAX for satSnr, UINT16_MAX for satAzim, UINT8_MAX for satElev.
1585  *
1586  * @note If the caller is passing an invalid Position sample reference into this function,
1587  * it is a fatal error, the function will not return.
1588  */
1589 //--------------------------------------------------------------------------------------------------
1591 (
1592  le_gnss_SampleRef_t positionSampleRef,
1593  ///< [IN] Position sample's reference.
1594  uint16_t* satIdPtr,
1595  ///< [OUT] Satellites in View ID number, referring
1596  ///< to NMEA standard.
1597  size_t* satIdSizePtr,
1598  ///< [INOUT]
1599  le_gnss_Constellation_t* satConstPtr,
1600  ///< [OUT] GNSS constellation type.
1601  size_t* satConstSizePtr,
1602  ///< [INOUT]
1603  bool* satUsedPtr,
1604  ///< [OUT] TRUE if satellite in View Used
1605  ///< for Navigation.
1606  size_t* satUsedSizePtr,
1607  ///< [INOUT]
1608  uint8_t* satSnrPtr,
1609  ///< [OUT] Satellites in View Signal To
1610  ///< Noise Ratio [dBHz].
1611  size_t* satSnrSizePtr,
1612  ///< [INOUT]
1613  uint16_t* satAzimPtr,
1614  ///< [OUT] Satellites in View Azimuth [degrees].
1615  ///< Range: 0 to 360
1616  ///< If Azimuth angle is currently unknown,
1617  ///< the value is set to UINT16_MAX.
1618  size_t* satAzimSizePtr,
1619  ///< [INOUT]
1620  uint8_t* satElevPtr,
1621  ///< [OUT] Satellites in View Elevation [degrees].
1622  ///< Range: 0 to 90
1623  ///< If Elevation angle is currently unknown,
1624  ///< the value is set to UINT8_MAX.
1625  size_t* satElevSizePtr
1626  ///< [INOUT]
1627 );
1628 
1629 //--------------------------------------------------------------------------------------------------
1630 /**
1631  * Get the SBAS constellation category given the SBAS satellite number ID.
1632  *
1633  */
1634 //--------------------------------------------------------------------------------------------------
1636 (
1637  uint16_t satId
1638  ///< [IN] SBAS satellite number ID, referring to NMEA standard.
1639 );
1640 
1641 //--------------------------------------------------------------------------------------------------
1642 /**
1643  * Get the Satellites Vehicle status.
1644  *
1645  * @return
1646  * - LE_FAULT Function failed to find the positionSample.
1647  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid.
1648  * - LE_OK Function succeeded.
1649  *
1650  * @note If the caller is passing an invalid Position sample reference into this function,
1651  * it is a fatal error, the function will not return.
1652  */
1653 //--------------------------------------------------------------------------------------------------
1655 (
1656  le_gnss_SampleRef_t positionSampleRef,
1657  ///< [IN] Position sample's reference.
1658  uint8_t* satsInViewCountPtr,
1659  ///< [OUT] Number of satellites expected to be in view.
1660  uint8_t* satsTrackingCountPtr,
1661  ///< [OUT] Number of satellites in view, when tracking.
1662  uint8_t* satsUsedCountPtr
1663  ///< [OUT] Number of satellites in view used for Navigation.
1664 );
1665 
1666 //--------------------------------------------------------------------------------------------------
1667 /**
1668  * Get the DOP parameters (Dilution Of Precision) for the fixed position.
1669  *
1670  * @return
1671  * - LE_FAULT Function failed to find the positionSample.
1672  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to UINT16_MAX).
1673  * - LE_OK Function succeeded.
1674  *
1675  * @deprecated This function is deprecated, le_gnss_GetDilutionOfPrecision() should be used for
1676  * new code.
1677  *
1678  * @note The DOP values are given with 3 decimal places like: DOP value 2200 = 2.200
1679  *
1680  * @note If the caller is passing an invalid Position sample reference into this function,
1681  * it is a fatal error, the function will not return.
1682  */
1683 //--------------------------------------------------------------------------------------------------
1685 (
1686  le_gnss_SampleRef_t positionSampleRef,
1687  ///< [IN] Position sample's reference.
1688  uint16_t* hdopPtr,
1689  ///< [OUT] Horizontal Dilution of Precision [resolution 1e-3].
1690  uint16_t* vdopPtr,
1691  ///< [OUT] Vertical Dilution of Precision [resolution 1e-3].
1692  uint16_t* pdopPtr
1693  ///< [OUT] Position Dilution of Precision [resolution 1e-3].
1694 );
1695 
1696 //--------------------------------------------------------------------------------------------------
1697 /**
1698  * Get the DOP parameter (Dilution Of Precision) for the fixed position.
1699  *
1700  * @return
1701  * - LE_FAULT Function failed to find the DOP value.
1702  * - LE_OUT_OF_RANGE The retrieved parameter is invalid (set to UINT16_MAX).
1703  * - LE_OK Function succeeded.
1704  *
1705  * @note This function replaces the deprecated function le_gnss_GetDop().
1706  *
1707  * @note The DOP value is given with 3 decimal places like: DOP value 2200 = 2.200
1708  *
1709  * @note If the caller is passing an invalid Position sample reference into this function,
1710  * it is a fatal error, the function will not return.
1711  */
1712 //--------------------------------------------------------------------------------------------------
1714 (
1715  le_gnss_SampleRef_t positionSampleRef,
1716  ///< [IN] Position sample's reference.
1717  le_gnss_DopType_t dopType,
1718  ///< [IN] Dilution of Precision type.
1719  uint16_t* dopPtr
1720  ///< [OUT] Dilution of Precision corresponding to the dopType
1721 );
1722 
1723 //--------------------------------------------------------------------------------------------------
1724 /**
1725  * Get the position sample's altitude with respect to the WGS-84 ellipsoid
1726  *
1727  * @return
1728  * - LE_FAULT Function failed to get the altitude.
1729  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
1730  * - LE_OK Function succeeded.
1731  *
1732  * @note altitudeOnWgs84 is in meters, with respect to the WGS-84 ellipsoid with 3 decimal
1733  * places (3047 = 3.047 meters).
1734  *
1735  * @note For a 2D position fix, the altitude with respect to the WGS-84 ellipsoid will be indicated
1736  * as invalid and set to INT32_MAX.
1737  *
1738  * @note If the caller is passing an invalid Position reference into this function,
1739  * it is a fatal error, the function will not return.
1740  */
1741 //--------------------------------------------------------------------------------------------------
1743 (
1744  le_gnss_SampleRef_t positionSampleRef,
1745  ///< [IN] Position sample's reference.
1746  int32_t* altitudeOnWgs84Ptr
1747  ///< [OUT] Altitude in meters, between WGS-84 earth ellipsoid
1748  ///< and mean sea level [resolution 1e-3].
1749 );
1750 
1751 //--------------------------------------------------------------------------------------------------
1752 /**
1753  * Get the position sample's magnetic deviation. It is the difference between the bearing to
1754  * true north and the bearing shown on a magnetic compass. The deviation is positive when the
1755  * magnetic north is east of true north.
1756  *
1757  * @return
1758  * - LE_FAULT Function failed to find the positionSample.
1759  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
1760  * - LE_OK Function succeeded.
1761  *
1762  * @note magneticDeviation is in degrees, with 1 decimal places (47 = 4.7 degree).
1763  *
1764  * @note If the caller is passing an invalid Position sample reference into this function,
1765  * it is a fatal error, the function will not return.
1766  */
1767 //--------------------------------------------------------------------------------------------------
1769 (
1770  le_gnss_SampleRef_t positionSampleRef,
1771  ///< [IN] Position sample's reference.
1772  int32_t* magneticDeviationPtr
1773  ///< [OUT] MagneticDeviation in degrees [resolution 1e-1].
1774 );
1775 
1776 //--------------------------------------------------------------------------------------------------
1777 /**
1778  * This function gets the last updated position sample object reference.
1779  *
1780  * @return A reference to last Position's sample.
1781  *
1782  * @note
1783  * On failure, the process exits, so you don't have to worry about checking the returned
1784  * reference for validity.
1785  */
1786 //--------------------------------------------------------------------------------------------------
1788 (
1789  void
1790 );
1791 
1792 //--------------------------------------------------------------------------------------------------
1793 /**
1794  * This function must be called to release the position sample.
1795  *
1796  * @note If the caller is passing an invalid Position sample reference into this function,
1797  * it is a fatal error, the function will not return.
1798  */
1799 //--------------------------------------------------------------------------------------------------
1801 (
1802  le_gnss_SampleRef_t positionSampleRef
1803  ///< [IN] Position sample's reference.
1804 );
1805 
1806 //--------------------------------------------------------------------------------------------------
1807 /**
1808  * This function sets the SUPL Assisted-GNSS mode.
1809  *
1810  * @return
1811  * - LE_OK on success
1812  * - LE_FAULT on failure
1813  * - LE_UNSUPPORTED request not supported
1814  * - LE_TIMEOUT a time-out occurred
1815  *
1816  * @warning The settings are platform dependent. Please refer to
1817  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1818  */
1819 //--------------------------------------------------------------------------------------------------
1821 (
1822  le_gnss_AssistedMode_t assistedMode
1823  ///< [IN] Assisted-GNSS mode.
1824 );
1825 
1826 //--------------------------------------------------------------------------------------------------
1827 /**
1828  * This function gets the SUPL Assisted-GNSS mode.
1829  *
1830  * @return
1831  * - LE_OK on success
1832  * - LE_FAULT on failure
1833  */
1834 //--------------------------------------------------------------------------------------------------
1836 (
1837  le_gnss_AssistedMode_t* assistedModePtr
1838  ///< [OUT] Assisted-GNSS mode.
1839 );
1840 
1841 //--------------------------------------------------------------------------------------------------
1842 /**
1843  * This function sets the SUPL server URL.
1844  * That server URL is a NULL-terminated string with a maximum string length (including NULL
1845  * terminator) equal to 256. Optionally the port number is specified after a colon.
1846  *
1847  * @return
1848  * - LE_OK on success
1849  * - LE_FAULT on failure
1850  * - LE_BUSY service is busy
1851  * - LE_TIMEOUT a time-out occurred
1852  *
1853  * @note If the SUPL server URL size is bigger than the maximum string length (including NULL
1854  * terminator) size, it is a fatal error, the function will not return.
1855  *
1856  * @warning The settings are platform dependent. Please refer to
1857  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1858  */
1859 //--------------------------------------------------------------------------------------------------
1861 (
1862  const char* LE_NONNULL suplServerUrl
1863  ///< [IN] SUPL server URL.
1864 );
1865 
1866 //--------------------------------------------------------------------------------------------------
1867 /**
1868  * This function injects the SUPL certificate to be used in A-GNSS sessions. Certificates must
1869  * be encoded in DER. Other certificate encryptions (e.g., PEM, CER and CRT)
1870  * aren't supported.
1871  *
1872  * @return
1873  * - LE_OK on success
1874  * - LE_BAD_PARAMETER on invalid parameter
1875  * - LE_FAULT on failure
1876  * - LE_BUSY service is busy
1877  * - LE_TIMEOUT a time-out occurred
1878  *
1879  * @note If the SUPL certificate size is bigger than the Maximum SUPL certificate size,
1880  * it is a fatal error, the function will not return.
1881  */
1882 //--------------------------------------------------------------------------------------------------
1884 (
1885  uint8_t suplCertificateId,
1886  ///< [IN] ID of the SUPL certificate.
1887  ///< Certificate ID range is 0 to 9
1888  uint16_t suplCertificateLen,
1889  ///< [IN] SUPL certificate size in Bytes.
1890  const char* LE_NONNULL suplCertificate
1891  ///< [IN] SUPL certificate contents.
1892 );
1893 
1894 //--------------------------------------------------------------------------------------------------
1895 /**
1896  * This function deletes the SUPL certificate.
1897  *
1898  * @return
1899  * - LE_OK on success
1900  * - LE_BAD_PARAMETER on invalid parameter
1901  * - LE_FAULT on failure
1902  * - LE_BUSY service is busy
1903  * - LE_TIMEOUT a time-out occurred
1904  */
1905 //--------------------------------------------------------------------------------------------------
1907 (
1908  uint8_t suplCertificateId
1909  ///< [IN] ID of the SUPL certificate.
1910  ///< Certificate ID range is 0 to 9
1911 );
1912 
1913 //--------------------------------------------------------------------------------------------------
1914 /**
1915  * This function sets the enabled NMEA sentences using a bit mask.
1916  *
1917  * @return
1918  * - LE_OK Success
1919  * - LE_BAD_PARAMETER Bit mask exceeds the maximal value
1920  * - LE_FAULT Failure
1921  * - LE_BUSY Service is busy
1922  * - LE_TIMEOUT Timeout occurred
1923  * - LE_NOT_PERMITTED GNSS device is not in "ready" state
1924  *
1925  * @warning This function may be subject to limitations depending on the platform. Please refer to
1926  * the @ref platformConstraintsGnss page.
1927  *
1928  * @note Some NMEA sentences are unsupported depending on the plateform. Please refer to
1929  * @ref platformConstraintsGnss_nmeaMask section for full details. Setting an unsuported NMEA
1930  * sentence won't report an error.
1931  *
1932  * @warning The settings are platform dependent. Please refer to
1933  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1934  *
1935  * @deprecated LE_GNSS_NMEA_MASK_PQXFI is deprecated. LE_GNSS_NMEA_MASK_PTYPE should be used
1936  * instead. Setting LE_GNSS_NMEA_MASK_PTYPE will also set LE_GNSS_NMEA_MASK_PQXFI.
1937  */
1938 //--------------------------------------------------------------------------------------------------
1940 (
1941  le_gnss_NmeaBitMask_t nmeaMask
1942  ///< [IN] Bit mask for enabled NMEA sentences.
1943 );
1944 
1945 //--------------------------------------------------------------------------------------------------
1946 /**
1947  * This function gets the bit mask for the enabled NMEA sentences.
1948  *
1949  * @return
1950  * - LE_OK Success
1951  * - LE_FAULT Failure
1952  * - LE_BUSY Service is busy
1953  * - LE_TIMEOUT Timeout occurred
1954  * - LE_NOT_PERMITTED GNSS device is not in "ready" state
1955  *
1956  * @note If the caller is passing an null pointer to this function, it is a fatal error
1957  * and the function will not return.
1958  *
1959  * @note Some NMEA sentences are unsupported depending on the plateform. Please refer to
1960  * @ref platformConstraintsGnss_nmeaMask section for full details. The bit mask for an unset
1961  * or unsupported NMEA sentence is zero.
1962  */
1963 //--------------------------------------------------------------------------------------------------
1965 (
1966  le_gnss_NmeaBitMask_t* nmeaMaskPtrPtr
1967  ///< [OUT] Bit mask for enabled NMEA sentences.
1968 );
1969 
1970 //--------------------------------------------------------------------------------------------------
1971 /**
1972  * This function returns the status of the GNSS device.
1973  *
1974  */
1975 //--------------------------------------------------------------------------------------------------
1977 (
1978  void
1979 );
1980 
1981 //--------------------------------------------------------------------------------------------------
1982 /**
1983  * This function sets the GNSS minimum elevation.
1984  *
1985  * @return
1986  * - LE_OK on success
1987  * - LE_FAULT on failure
1988  * - LE_OUT_OF_RANGE if the minimum elevation is above range
1989  * - LE_UNSUPPORTED request not supported
1990  *
1991  * @warning The settings are platform dependent. Please refer to
1992  * @ref platformConstraintsGnss_SettingConfiguration section for full details.
1993  */
1994 //--------------------------------------------------------------------------------------------------
1996 (
1997  uint8_t minElevation
1998  ///< [IN] Minimum elevation in degrees [range 0..90].
1999 );
2000 
2001 //--------------------------------------------------------------------------------------------------
2002 /**
2003  * This function gets the GNSS minimum elevation.
2004  *
2005  * @return
2006  * - LE_OK on success
2007  * - LE_FAULT on failure
2008  * - LE_UNSUPPORTED request not supported
2009  *
2010  * @note If the caller is passing an null pointer to this function, it is a fatal error
2011  * and the function will not return.
2012  */
2013 //--------------------------------------------------------------------------------------------------
2015 (
2016  uint8_t* minElevationPtrPtr
2017  ///< [OUT] Minimum elevation in degrees [range 0..90].
2018 );
2019 
2020 #endif // LE_GNSS_INTERFACE_H_INCLUDE_GUARD
Definition: le_gnss_interface.h:654
le_gnss_AssistedMode_t
Definition: le_gnss_interface.h:711
le_result_t le_gnss_GetDirection(le_gnss_SampleRef_t positionSampleRef, uint32_t *directionPtr, uint32_t *directionAccuracyPtr)
le_gnss_DopType_t
Definition: le_gnss_interface.h:728
le_result_t le_gnss_GetAltitude(le_gnss_SampleRef_t positionSampleRef, int32_t *altitudePtr, int32_t *vAccuracyPtr)
The GNSS device is not initialized.
Definition: le_gnss_interface.h:614
le_gnss_SbasConstellationCategory_t le_gnss_GetSbasConstellationCategory(uint16_t satId)
le_result_t le_gnss_InjectSuplCertificate(uint8_t suplCertificateId, uint16_t suplCertificateLen, const char *LE_NONNULL suplCertificate)
Do not use.
Definition: le_gnss_interface.h:622
le_result_t le_gnss_GetSatellitesInfo(le_gnss_SampleRef_t positionSampleRef, uint16_t *satIdPtr, size_t *satIdSizePtr, le_gnss_Constellation_t *satConstPtr, size_t *satConstSizePtr, bool *satUsedPtr, size_t *satUsedSizePtr, uint8_t *satSnrPtr, size_t *satSnrSizePtr, uint16_t *satAzimPtr, size_t *satAzimSizePtr, uint8_t *satElevPtr, size_t *satElevSizePtr)
Definition: le_gnss_interface.h:691
le_result_t le_gnss_GetExtendedEphemerisValidity(uint64_t *startTimePtr, uint64_t *stopTimePtr)
GNGSA type enabled: GNSS DOP and active satellites.
Definition: le_gnss_interface.h:806
le_result_t
Definition: le_basics.h:35
Vertical dilution of precision.
Definition: le_gnss_interface.h:734
le_result_t le_gnss_Start(void)
Standalone mode.
Definition: le_gnss_interface.h:713
le_gnss_PositionHandlerRef_t le_gnss_AddPositionHandler(le_gnss_PositionHandlerFunc_t handlerPtr, void *contextPtr)
Russian satellite navigation system.
Definition: le_gnss_interface.h:774
le_result_t le_gnss_GetEpochTime(le_gnss_SampleRef_t positionSampleRef, uint64_t *millisecondsPtr)
le_result_t le_gnss_ForceFactoryRestart(void)
struct le_gnss_Sample * le_gnss_SampleRef_t
Definition: le_gnss_interface.h:604
le_result_t le_gnss_LoadExtendedEphemerisFile(int fd)
PSTIS type enabled: GPS session start indication.
Definition: le_gnss_interface.h:812
le_result_t le_gnss_GetAcquisitionRate(uint32_t *ratePtr)
void le_gnss_DisconnectService(void)
Definition: le_gnss_interface.h:663
GAGNS type enabled: Fix data for Galileo.
Definition: le_gnss_interface.h:819
Definition: le_gnss_interface.h:682
PTYPE type enabled: Proprietary Type mask.
Definition: le_gnss_interface.h:814
Definition: le_gnss_interface.h:694
Chinese satellite navigation system.
Definition: le_gnss_interface.h:776
GNGNS type enabled: GNSS fix data.
Definition: le_gnss_interface.h:805
Position dilution of precision.
Definition: le_gnss_interface.h:730
GAGGA type enabled: Galileo fix data.
Definition: le_gnss_interface.h:807
le_result_t le_gnss_ForceColdRestart(void)
GAGSA type enabled: Galileo DOP and active satellites.
Definition: le_gnss_interface.h:808
Estimated (i.e. forward predicted) position fix.
Definition: le_gnss_interface.h:641
le_result_t le_gnss_ForceWarmRestart(void)
le_gnss_State_t
Definition: le_gnss_interface.h:612
le_result_t le_gnss_InjectUtcTime(uint64_t timeUtc, uint32_t timeUnc)
GPGSV type enabled: GPS satellites in view.
Definition: le_gnss_interface.h:801
GPGRS type enabled: GPS Range residuals.
Definition: le_gnss_interface.h:815
Outside US area.
Definition: le_gnss_interface.h:757
Definition: le_gnss_interface.h:688
Japanese satellite navigation system.
Definition: le_gnss_interface.h:781
le_result_t le_gnss_SetConstellationArea(le_gnss_Constellation_t satConstellation, le_gnss_ConstellationArea_t constellationArea)
le_result_t le_gnss_GetTtff(uint32_t *ttffPtr)
le_result_t le_gnss_GetConstellation(le_gnss_ConstellationBitMask_t *constellationMaskPtr)
The GNSS device is active.
Definition: le_gnss_interface.h:618
void le_gnss_RemovePositionHandler(le_gnss_PositionHandlerRef_t handlerRef)
le_result_t le_gnss_SetSuplServerUrl(const char *LE_NONNULL suplServerUrl)
Maximum value.
Definition: le_gnss_interface.h:700
le_result_t le_gnss_EnableExtendedEphemerisFile(void)
Unset area.
Definition: le_gnss_interface.h:753
3-Dimensional position fix.
Definition: le_gnss_interface.h:639
le_result_t le_gnss_GetAltitudeOnWgs84(le_gnss_SampleRef_t positionSampleRef, int32_t *altitudeOnWgs84Ptr)
le_result_t le_gnss_GetTime(le_gnss_SampleRef_t positionSampleRef, uint16_t *hoursPtr, uint16_t *minutesPtr, uint16_t *secondsPtr, uint16_t *millisecondsPtr)
le_result_t le_gnss_GetSuplAssistedMode(le_gnss_AssistedMode_t *assistedModePtr)
le_result_t le_gnss_GetLocation(le_gnss_SampleRef_t positionSampleRef, int32_t *latitudePtr, int32_t *longitudePtr, int32_t *hAccuracyPtr)
le_result_t le_gnss_DisableExtendedEphemerisFile(void)
Time dilution of precision.
Definition: le_gnss_interface.h:738
GAVTG type enabled: Galileo vector track and speed over the ground.
Definition: le_gnss_interface.h:811
le_result_t le_gnss_TryConnectService(void)
le_result_t le_gnss_SetAcquisitionRate(uint32_t rate)
le_result_t le_gnss_SetMinElevation(uint8_t minElevation)
Definition: le_gnss_interface.h:657
le_gnss_NmeaBitMask_t
Definition: le_gnss_interface.h:797
le_result_t le_gnss_GetDilutionOfPrecision(le_gnss_SampleRef_t positionSampleRef, le_gnss_DopType_t dopType, uint16_t *dopPtr)
le_result_t le_gnss_DeleteSuplCertificate(uint8_t suplCertificateId)
North American satellite navigation system.
Definition: le_gnss_interface.h:772
le_gnss_FixState_t
Definition: le_gnss_interface.h:633
2-Dimensional position fix.
Definition: le_gnss_interface.h:637
le_result_t le_gnss_GetMagneticDeviation(le_gnss_SampleRef_t positionSampleRef, int32_t *magneticDeviationPtr)
Definition: le_gnss_interface.h:697
void le_gnss_ReleaseSampleRef(le_gnss_SampleRef_t positionSampleRef)
Definition: le_gnss_interface.h:685
le_result_t le_gnss_GetNmeaSentences(le_gnss_NmeaBitMask_t *nmeaMaskPtrPtr)
DEBUG type enabled: Debug NMEA indication.
Definition: le_gnss_interface.h:817
GPGLL type enabled: GPS Geographic position, latitude / longitude.
Definition: le_gnss_interface.h:816
The GNSS device is disabled.
Definition: le_gnss_interface.h:620
le_result_t le_gnss_GetVerticalSpeed(le_gnss_SampleRef_t positionSampleRef, int32_t *vspeedPtr, int32_t *vspeedAccuracyPtr)
MS-Assisted mode.
Definition: le_gnss_interface.h:717
le_result_t le_gnss_SetSuplAssistedMode(le_gnss_AssistedMode_t assistedMode)
le_result_t le_gnss_GetDate(le_gnss_SampleRef_t positionSampleRef, uint16_t *yearPtr, uint16_t *monthPtr, uint16_t *dayPtr)
le_gnss_ConstellationBitMask_t
Definition: le_gnss_interface.h:770
GPVTG type enabled: GPS vector track and speed over the ground.
Definition: le_gnss_interface.h:803
void le_gnss_ConnectService(void)
GPRMC type enabled: GPS recommended minimum data.
Definition: le_gnss_interface.h:802
le_result_t le_gnss_GetSatellitesStatus(le_gnss_SampleRef_t positionSampleRef, uint8_t *satsInViewCountPtr, uint8_t *satsTrackingCountPtr, uint8_t *satsUsedCountPtr)
European Union satellite navigation system.
Definition: le_gnss_interface.h:778
le_result_t le_gnss_Stop(void)
Definition: le_gnss_interface.h:666
Worldwide area.
Definition: le_gnss_interface.h:755
le_gnss_State_t le_gnss_GetState(void)
le_result_t le_gnss_SetNmeaSentences(le_gnss_NmeaBitMask_t nmeaMask)
Horizontal dilution of precision.
Definition: le_gnss_interface.h:732
le_gnss_ConstellationArea_t
Definition: le_gnss_interface.h:751
le_result_t le_gnss_GetPositionState(le_gnss_SampleRef_t positionSampleRef, le_gnss_FixState_t *statePtr)
le_result_t le_gnss_GetMinElevation(uint8_t *minElevationPtrPtr)
le_result_t le_gnss_Disable(void)
GPGGA type enabled: GPS fix data.
Definition: le_gnss_interface.h:799
void le_gnss_SetServerDisconnectHandler(le_gnss_DisconnectHandler_t disconnectHandler, void *contextPtr)
Definition: le_gnss_interface.h:660
le_result_t le_gnss_GetHorizontalSpeed(le_gnss_SampleRef_t positionSampleRef, uint32_t *hspeedPtr, uint32_t *hspeedAccuracyPtr)
void(* le_gnss_PositionHandlerFunc_t)(le_gnss_SampleRef_t positionSampleRef, void *contextPtr)
Definition: le_gnss_interface.h:839
le_gnss_SampleRef_t le_gnss_GetLastSampleRef(void)
le_result_t le_gnss_SetConstellation(le_gnss_ConstellationBitMask_t constellationMask)
GNSS constellation field not defined.
Definition: le_gnss_interface.h:680
le_result_t le_gnss_ForceHotRestart(void)
SBAS constellation used in solution.
Definition: le_gnss_interface.h:780
MS-Based mode.
Definition: le_gnss_interface.h:715
le_result_t le_gnss_Enable(void)
void(* le_gnss_DisconnectHandler_t)(void *)
Definition: le_gnss_interface.h:421
le_result_t le_gnss_GetGpsTime(le_gnss_SampleRef_t positionSampleRef, uint32_t *gpsWeekPtr, uint32_t *gpsTimeOfWeekPtr)
GPDTM type enabled: Local geodetic datum and datum offset from.
Definition: le_gnss_interface.h:818
GPGSA type enabled: GPS DOP and active satellites.
Definition: le_gnss_interface.h:800
le_gnss_SbasConstellationCategory_t
Definition: le_gnss_interface.h:652
le_result_t le_gnss_GetConstellationArea(le_gnss_Constellation_t satConstellation, le_gnss_ConstellationArea_t *constellationAreaPtr)
le_result_t le_gnss_GetGpsLeapSeconds(le_gnss_SampleRef_t positionSampleRef, uint8_t *leapSecondsPtr)
The GNSS device is ready.
Definition: le_gnss_interface.h:616
The GNSS fix position is not fixed.
Definition: le_gnss_interface.h:635
Geometric dilution of precision.
Definition: le_gnss_interface.h:736
GLGSV type enabled: GLONASS satellites in view.
Definition: le_gnss_interface.h:804
GAGSV type enabled: Galileo satellites in view.
Definition: le_gnss_interface.h:809
le_result_t le_gnss_GetTimeAccuracy(le_gnss_SampleRef_t positionSampleRef, uint32_t *timeAccuracyPtr)
struct le_gnss_PositionHandler * le_gnss_PositionHandlerRef_t
Definition: le_gnss_interface.h:829
GARMC type enabled: Galileo recommended minimum data.
Definition: le_gnss_interface.h:810
le_gnss_Constellation_t
Definition: le_gnss_interface.h:678
le_result_t le_gnss_GetDop(le_gnss_SampleRef_t positionSampleRef, uint16_t *hdopPtr, uint16_t *vdopPtr, uint16_t *pdopPtr)