le_gnss_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_gnss GNSS
12  *
13  * @ref le_gnss_interface.h "API Reference"
14  *
15  * @ref howToGNSS
16  *
17  * <HR>
18  *
19  * This API provides access to the GNSS device.
20  *
21  * GNSS or Global Navigation Satellite System is a satellite navigation system with global coverage.
22  *
23  * This API provides function to configure the GNSS device and retrieve position information.
24  *
25  * @section le_gnss_binding IPC interfaces binding
26  *
27  * All the functions of this API are provided by the @b positioningService application service.
28  *
29  * Here's a code sample binding to Positioning services:
30  * @verbatim
31  bindings:
32  {
33  clientExe.clientComponent.le_gnss -> positioningService.le_gnss
34  }
35  @endverbatim
36  *
37  * @section le_gnss_ControlApi GNSS Control API
38  *
39  * @subsection le_gnss_EnableDisable Enable/Disable GNSS device
40  *
41  * The application can enable/disable the GNSS device with the le_gnss_Enable()
42  * / le_gnss_Disable() functions.
43  * By default the GNSS device is enabled for the positioningService application service.
44  * Also see @ref howToGNSS.
45  *
46  * A sample code can be seen in the following page:
47  * - @subpage c_gnssSampleCodeEnableDisable
48  *
49  * @subsection le_gnss_StartStop Start/Stop GNSS device
50  *
51  * The application can start/stop the GNSS device with the le_gnss_Start() / le_gnss_Stop()
52  * functions.
53  * The default "HOT" start condition is applied and all assistance data are used.
54  * Also see @ref howToGNSS.
55  *
56  * A sample code can be seen in the following page:
57  * - @subpage c_gnssSampleCodeStartStop
58  *
59  * @subsubsection le_gnss_StartingMode Starting mode
60  *
61  * Starting modes are used only for test purposes and allow start performance measurement.
62  * @note For more information about start performances, please refer to your specific
63  * platform documentation.
64  *
65  * @subsubsection le_gnss_Data GNSS data
66  * The following table describes the <b>minimum</b> required data for those starting modes:
67  *
68  * | GNSS Data / Starting mode | HOT | WARM | COLD | FACTORY |
69  *| -----------------------| -----| ------| ----- | ------- |
70  *| Broadcasted Ephemeris | Used | | | |
71  *| Extended Ephemeris | Used(1) | Used(2) | Used(2) | Removed (3) |
72  *| Approximate Time and Position | Used | Used | | |
73  *| Almanac | Used | Used | Used | Used (Factory) |
74  *
75  * For example, a requested HOT start without valid broadcasted ephemeris will be treated
76  * as a WARM start.
77  *
78  * @note (1) Extended Ephemeris can be used if Broadcasted Ephemeris are not valid.
79  * The Extended Ephemeris could be loaded using the le_gnss_LoadExtendedEphemerisFile()
80  * function.
81  * @note (2) Extended Ephemeris is used if the Extended Ephemeris file is loaded and valid.
82  * @note (3) Extended Ephemeris are removed when a FACTORY start is requested.
83  * The Extended Ephemeris could be loaded again using the le_gnss_LoadExtendedEphemerisFile()
84  * function.
85  *
86  * @subsubsection le_gnss_TTFF Time To First Fix (TTFF)
87  * The le_gnss_GetTtff() function provides the TTFF (first between 2-Dimensional or 3-Dimensional
88  * position fix) of the last position fix.
89  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
90  *
91  * A sample code can be seen in the following page:
92  * - @subpage c_gnssSampleCodeReStart
93  *
94  * @subsubsection le_gnss_ForceHotRestart Force HOT restart
95  * The le_gnss_ForceHotRestart() function performs a "HOT" restart of the GNSS device. The current
96  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
97  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
98  *
99  * @subsubsection le_gnss_ForceWarmRestart Force WARM restart
100  * The le_gnss_ForceWarmRestart() function performs a "WARM" restart of the GNSS device. The current
101  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
102  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
103  *
104  * @subsubsection le_gnss_ForceColdRestart Force COLD restart
105  * The le_gnss_ForceColdRestart() function performs a "COLD" restart of the GNSS device. The current
106  * GNSS session is stopped, then started using the available @ref le_gnss_Data.
107  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
108  *
109  * @subsubsection le_gnss_ForceFactoryRestart Force FACTORY restart
110  * The le_gnss_ForceFactoryRestart() function performs a "FACTORY" restart of the GNSS device.
111  * The current GNSS session is stopped, then started using the available @ref le_gnss_Data.
112  * Please refer to @ref le_gnss_APIcallsRequirements. Also see @ref howToGNSS.
113  *
114  * @subsection le_gnss_AcquisitionRate Acquisition rate
115  * The GNSS position is computed and delivered each acquisition rate. Default value is 1 second.
116  * The application can configure/retreive the GNSS device acquisition rate with the
117  * le_gnss_SetAcquisitionRate() / le_gnss_GetAcquisitionRate() functions.
118  *
119  * Please refer to @ref le_gnss_APIcallsRequirements.
120  *
121  * A sample code can be seen in the following page:
122  * - @subpage c_gnssSampleCodeAcquisitionRate
123  *
124  * @subsection le_gnss_SetGetConstellation GNSS constellation selection
125  *
126  * The le_gnss_SetConstellation() function selects the GNSS constellation(s) used in solution.
127  * If all GNSS constellations are disabled, the GNSS engine is disabled.
128  *
129  * @warning Your platform may require a reboot to take into account this change. Please refer to your
130  * platform documentation for further details.
131  *
132  * The following configurations are currently supported:
133  * - GPS
134  * - GPS + GLONASS
135  *
136  * All supported GNSS constellations are enabled by default.
137  * The le_gnss_GetConstellation() function gets the GNSS constellation(s) enabled to be used
138  * in solution.
139  *
140  * A sample code can be seen in the following page:
141  * - @subpage c_gnssSampleCodeConstellation
142  *
143  * @subsection le_gnss_APIcallsRequirements API calls Requirements
144  * The following table shows the pre-requisites when using the GNSS service API function set.
145  * ''LE_OK or error code'' means the function is authorized in the corresponding state, the request
146  * is performed and the result is returned; otherwise the returned error is indicated for each state
147  *.
148  * | Function / GNSS state | UNINITIALIZED | READY | ACTIVE | DISABLED |
149  *| ----------------------------- | --------------------------- | -----------------------------| --------------------------- | --------------------------- |
150  *| le_gnss_Start() | LE_NOT_PERMITTED | LE_OK or error code | LE_DUPLICATE | LE_NOT_PERMITTED |
151  *| le_gnss_Stop() | LE_NOT_PERMITTED | LE_DUPLICATE | LE_OK or error code | LE_NOT_PERMITTED |
152  *| le_gnss_ForceHotRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
153  *| le_gnss_ForceWarmRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
154  *| le_gnss_ForceColdRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
155  *| le_gnss_ForceFactoryRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |
156  *| le_gnss_Disable() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_DUPLICATE |
157  *| le_gnss_Enable() | LE_NOT_PERMITTED | LE_DUPLICATE | LE_DUPLICATE | LE_OK or error code |
158  *| le_gnss_SetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
159  *| le_gnss_GetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
160  *| le_gnss_GetTtff() | LE_NOT_PERMITTED | LE_OK or error code | LE_OK or error code | LE_NOT_PERMITTED |
161  *| le_gnss_SetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
162  *| le_gnss_GetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |
163  *
164  * Also see @ref howToGNSS.
165  *
166  * @section le_gnss_Information GNSS position information
167  * @ref le_gnss_NMEA
168  *
169  * @ref le_gnss_GetInfo
170  *
171  * @subsection le_gnss_NMEA NMEA Flow
172  * The National Marine Electronics Association (NMEA) standard defines an electrical interface
173  * and data protocol for communications between marine instrumentation.
174  *
175  * The NMEA-0183, scope of this document, defines a set of frame prefixed by
176  * $GP (concerning Global Positioning System),
177  * $GL (concerning GLONASS)
178  * and $GN (concerning combination of navigation systems).
179  * For more details about NMEA standards, please refer to http://www.nmea.org/.
180  *
181  * That NMEA frames flow can be retrieved from the "/dev/nmea" device folder, using for example
182  * the shell command $<EM> cat /dev/nmea | grep '$G'</EM>
183  *
184  * @subsection le_gnss_GetInfo Get position information
185  * The position information is referenced to a position sample object.
186  *
187  * An application can register a handler to be notified of the
188  * updated position each @ref le_gnss_AcquisitionRate, returning a position sample object.
189  *
190  * The GNSS information commonly used such as
191  * position, time and date, satellites information and accuracy
192  * can be queried using the following functions:
193  * - le_gnss_GetPositionState()
194  * - le_gnss_GetLocation()
195  * - le_gnss_GetAltitude()
196  * - le_gnss_GetDate()
197  * - le_gnss_GetTime()
198  * - le_gnss_GetGpsTime()
199  * - le_gnss_GetTimeAccuracy()
200  * - le_gnss_GetHorizontalSpeed()
201  * - le_gnss_GetVerticalSpeed()
202  * - le_gnss_GetDirection()
203  * - le_gnss_GetSatellitesInfo()
204  * - le_gnss_GetSatellitesStatus()
205  * - le_gnss_GetDop()
206  *
207  * The handler can be managed using le_gnss_AddPositionHandler()
208  * and le_gnss_RemovePositionHandler().
209  * When a position is computed, the handler is called.
210  *
211  * The application has to release each position sample object received by the handler,
212  * using the le_gnss_ReleaseSampleRef().
213  *
214  * A sample code can be seen in the following page:
215  * - @subpage c_gnssSampleCodePosition
216  *
217  * @section le_gnss_Assisted_GNSS Assisted GNSS
218  *
219  * @ref le_gnss_Assisted_GNSS_EE
220  * @ref le_gnss_Assisted_GNSS_UP
221  *
222  * @subsection le_gnss_Assisted_GNSS_EE Server based Extended Ephemeris
223  *
224  * @todo Add detailed documentation.
225  *
226  * With le_gnss_LoadExtendedEphemerisFile() , you can load an 'Extended Ephemeris' file into
227  * the GNSS device from the filesystem.
228  * You have to download the file before loading it.
229  * @warning Ensure to check that the downloaded file is supported for your specific platform.
230  *
231  * With le_gnss_GetExtendedEphemerisValidity(), you will to get the validity of the last injected
232  * Extended Ephemeris.
233  *
234  * You can enable/disable the use of the 'Extended Ephemeris' file into the GNSS device with
235  * le_gnss_EnableExtendedEphemerisFile() / le_gnss_DisableExtendedEphemerisFile() functions.
236  * @warning Ensure to check configuration capabilities for your specific platform.
237  * A reboot must be required if your platform doesn't allow run-time configuration.
238  *
239  * A sample code can be seen in the following page:
240  * - @subpage c_gnssSampleCodeXtra
241  *
242  * @subsection le_gnss_Assisted_GNSS_UP 3GPP User Plane (OMA SUPL)
243  *
244  * That 3GPP User Plane A-GNSS (Assisted GNSS) protocol is defined by two different standardization
245  * bodies, 3GPP and Open Mobile Alliance (OMA). For more information, please refer to the standard.
246  *
247  * Both MS-Assisted and MS-Based position determination methods are supported in the User Plane.
248  *
249  * In MS-Assisted mode, the MS (Mobile Station) measures the signals from the GNSS satellites
250  *, then returns the retrieved GNSS data to the SUPL (Secure User Plan Location) server, where the
251  * position calculation is performed.
252  *
253  * In MS-Based mode, the MS gets the assistance data from the SUPL (Secure User Plan Location)
254  * server. The MS measures the signals from the GNSS satellites and makes the position calculation.
255  *
256  * The data transport over User Plan is done using the TCP/IP protocol.
257  *
258  * The Assisted-GNSS mode can be configured thru the le_gnss_SetSuplAssistedMode() function.
259  *
260  * The supported modes are the following:
261  * - Standalone mode: That 3GPP User Plane A-GNSS feature is deactivated.
262  * - MS-Based mode
263  * - MS-Assisted mode
264  *
265  * Moreover, the le_gnss_GetSuplAssistedMode() function reads the configured Assisted-GNSS mode.
266  *
267  * The SUPL server is configured using the le_gnss_SetSuplServerUrl() function. That function sets
268  * the SUPL server URL and optionally the port number.
269  *
270  * The SUPL certificate to be used in A-GNSS sessions is injected through the
271  * le_gnss_InjectSuplCertificate() function and deleted through the le_gnss_DeleteSuplCertificate()
272  * function.
273  *
274  *
275  * <HR>
276  *
277  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
278  */
279 /**
280  * @page c_gnssSampleCode Sample code for GNSS device
281  *
282  * @include "apps/test/positioning/gnssTest/gnssTest/gnssTest.c"
283  */
284 /**
285  * @page c_gnssSampleCodeEnableDisable Sample code for Enable/Disable GNSS device
286  *
287  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssEnable
288  */
289 /**
290  * @page c_gnssSampleCodeStartStop Sample code for Start/Stop GNSS device
291  *
292  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
293  */
294 /**
295  * @page c_gnssSampleCodeReStart Sample code for restart GNSS device and get TTFF
296  *
297  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssReStart
298  */
299 /**
300  * @page c_gnssSampleCodeAcquisitionRate Sample code for GNSS acquisition rate configuration
301  *
302  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
303  */
304 /**
305  * @page c_gnssSampleCodeConstellation Sample code for GNSS constellation selection
306  *
307  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssControl
308  */
309 /**
310  * @page c_gnssSampleCodePosition Sample code for GNSS position information
311  *
312  * @snippet "apps/test/positioning/gnssTest/gnssTest/gnssTest.c" GnssPosition
313  */
314 /**
315  * @page c_gnssSampleCodeXtra Sample code for GNSS Server based Extended Ephemeris
316  *
317  * @include "apps/test/positioning/gnssXtraTest/gnssXtraTest/xtraTest.c"
318  */
319 /**
320  * @file le_gnss_interface.h
321  *
322  * Legato @ref c_gnss include file.
323  *
324  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
325  */
326 
327 #ifndef LE_GNSS_INTERFACE_H_INCLUDE_GUARD
328 #define LE_GNSS_INTERFACE_H_INCLUDE_GUARD
329 
330 
331 #include "legato.h"
332 
333 //--------------------------------------------------------------------------------------------------
334 /**
335  *
336  * Connect the current client thread to the service providing this API. Block until the service is
337  * available.
338  *
339  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
340  * called before any other functions in this API. Normally, ConnectService is automatically called
341  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
342  *
343  * This function is created automatically.
344  */
345 //--------------------------------------------------------------------------------------------------
347 (
348  void
349 );
350 
351 //--------------------------------------------------------------------------------------------------
352 /**
353  *
354  * Try to connect the current client thread to the service providing this API. Return with an error
355  * if the service is not available.
356  *
357  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
358  * called before any other functions in this API. Normally, ConnectService is automatically called
359  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
360  *
361  * This function is created automatically.
362  *
363  * @return
364  * - LE_OK if the client connected successfully to the service.
365  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
366  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
367  * - LE_COMM_ERROR if the Service Directory cannot be reached.
368  */
369 //--------------------------------------------------------------------------------------------------
371 (
372  void
373 );
374 
375 //--------------------------------------------------------------------------------------------------
376 /**
377  *
378  * Disconnect the current client thread from the service providing this API.
379  *
380  * Normally, this function doesn't need to be called. After this function is called, there's no
381  * longer a connection to the service, and the functions in this API can't be used. For details, see
382  * @ref apiFilesC_client.
383  *
384  * This function is created automatically.
385  */
386 //--------------------------------------------------------------------------------------------------
388 (
389  void
390 );
391 
392 
393 //--------------------------------------------------------------------------------------------------
394 /**
395  * Reference type for dealing with GNSS position samples.
396  */
397 //--------------------------------------------------------------------------------------------------
398 typedef struct le_gnss_Sample* le_gnss_SampleRef_t;
399 
400 
401 //--------------------------------------------------------------------------------------------------
402 /**
403  * Maximum length of the SUP Server URL string.
404  */
405 //--------------------------------------------------------------------------------------------------
406 #define LE_GNSS_SUPL_SERVER_URL_MAX_LEN 256
407 
408 
409 //--------------------------------------------------------------------------------------------------
410 /**
411  * Maximum length of the SUP Server URL string.
412  * One extra byte is added for the null character.
413  */
414 //--------------------------------------------------------------------------------------------------
415 #define LE_GNSS_SUPL_SERVER_URL_MAX_BYTES 257
416 
417 
418 //--------------------------------------------------------------------------------------------------
419 /**
420  * Maximum SUPL certificate size.
421  */
422 //--------------------------------------------------------------------------------------------------
423 #define LE_GNSS_SUPL_CERTIFICATE_MAX_LEN 2000
424 
425 
426 //--------------------------------------------------------------------------------------------------
427 /**
428  * Maximum SUPL certificate string size.
429  * One extra byte is added for the null character.
430  */
431 //--------------------------------------------------------------------------------------------------
432 #define LE_GNSS_SUPL_CERTIFICATE_MAX_BYTES 2001
433 
434 
435 //--------------------------------------------------------------------------------------------------
436 /**
437  * Define the maximum length of the Satellites Vehicle information list
438  */
439 //--------------------------------------------------------------------------------------------------
440 #define LE_GNSS_SV_INFO_MAX_LEN 80
441 
442 
443 //--------------------------------------------------------------------------------------------------
444 /**
445  * GNSS fix position states.
446  */
447 //--------------------------------------------------------------------------------------------------
448 typedef enum
449 {
451  ///< The GNSS fix position is not fixed.
452 
454  ///< 2-Dimensional position fix.
455 
457  ///< 3-Dimensional position fix.
458 
460  ///< Estimated (i.e. forward predicted) position fix.
461 }
463 
464 
465 //--------------------------------------------------------------------------------------------------
466 /**
467  * GNSS constellation type.
468  */
469 //--------------------------------------------------------------------------------------------------
470 typedef enum
471 {
473  ///< GNSS constellation field not defined.
474 
476  ///< Satellite Vehicle of GPS constellation.
477 
479  ///< Satellite Vehicle of SBAS constellation.
480 
482  ///< Satellite Vehicle of Glonass constellation.
483 
485  ///< Satellite Vehicle of Galileo constellation.
486 
488  ///< Maximum value.
489 }
491 
492 
493 //--------------------------------------------------------------------------------------------------
494 /**
495  * Assisted-GNSS mode
496  */
497 //--------------------------------------------------------------------------------------------------
498 typedef enum
499 {
501  ///< Standalone mode
502 
504  ///< MS-Based mode.
505 
507  ///< MS-Assisted mode.
508 }
510 
511 
512 //--------------------------------------------------------------------------------------------------
513 /**
514  * GNSS constellation Bit Mask (8 bits) indicating the GNSS constellation(s)
515  * used in solution.
516  *
517  */
518 //--------------------------------------------------------------------------------------------------
519 typedef enum
520 {
522  ///< GPS constellation used in solution.
523 
525  ///< GLONASS constellation used in solution.
526 
528  ///< BEIDOU constellation used in solution.
529 
531  ///< GALILEO constellation used in solution.
532 }
534 
535 
536 //--------------------------------------------------------------------------------------------------
537 /**
538  * Reference type used by Add/Remove functions for EVENT 'le_gnss_Position'
539  */
540 //--------------------------------------------------------------------------------------------------
541 typedef struct le_gnss_PositionHandler* le_gnss_PositionHandlerRef_t;
542 
543 
544 //--------------------------------------------------------------------------------------------------
545 /**
546  * Handler for position information.
547  *
548  *
549  * @param positionSampleRef
550  * Position's sample reference
551  * @param contextPtr
552  */
553 //--------------------------------------------------------------------------------------------------
554 typedef void (*le_gnss_PositionHandlerFunc_t)
555 (
556  le_gnss_SampleRef_t positionSampleRef,
557  void* contextPtr
558 );
559 
560 //--------------------------------------------------------------------------------------------------
561 /**
562  * Set the GNSS constellation bit mask
563  *
564  * @return
565  * - LE_FAULT The function failed.
566  * - LE_UNSUPPORTED If the request is not supported.
567  * - LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
568  * - LE_OK The function succeeded.
569  */
570 //--------------------------------------------------------------------------------------------------
572 (
573  le_gnss_ConstellationBitMask_t constellationMask
574  ///< [IN] GNSS constellation used in solution.
575 );
576 
577 //--------------------------------------------------------------------------------------------------
578 /**
579  * Get the GNSS constellation bit mask
580  *
581  * @return
582  * - LE_OK on success
583  * - LE_FAULT on failure
584  */
585 //--------------------------------------------------------------------------------------------------
587 (
588  le_gnss_ConstellationBitMask_t* constellationMaskPtr
589  ///< [OUT] GNSS constellation used in solution.
590 );
591 
592 //--------------------------------------------------------------------------------------------------
593 /**
594  * This function enables the use of the 'Extended Ephemeris' file into the GNSS device.
595  *
596  * @return
597  * - LE_FAULT The function failed.
598  * - LE_OK The function succeeded.
599  *
600  */
601 //--------------------------------------------------------------------------------------------------
603 (
604  void
605 );
606 
607 //--------------------------------------------------------------------------------------------------
608 /**
609  * This function disables the use of the 'Extended Ephemeris' file into the GNSS device.
610  *
611  * @return
612  * - LE_FAULT The function failed.
613  * - LE_OK The function succeeded.
614  *
615  */
616 //--------------------------------------------------------------------------------------------------
618 (
619  void
620 );
621 
622 //--------------------------------------------------------------------------------------------------
623 /**
624  * This function must be called to load an 'Extended Ephemeris' file into the GNSS device.
625  *
626  * @return
627  * - LE_FAULT The function failed to inject the 'Extended Ephemeris' file.
628  * - LE_TIMEOUT A time-out occurred.
629  * - LE_FORMAT_ERROR 'Extended Ephemeris' file format error.
630  * - LE_OK The function succeeded.
631  *
632  */
633 //--------------------------------------------------------------------------------------------------
635 (
636  int fd
637  ///< [IN] Extended ephemeris file descriptor
638 );
639 
640 //--------------------------------------------------------------------------------------------------
641 /**
642  * This function must be called to get the validity of the last injected Extended Ephemeris.
643  *
644  * @return
645  * - LE_FAULT The function failed to get the validity
646  * - LE_OK The function succeeded.
647  *
648  */
649 //--------------------------------------------------------------------------------------------------
651 (
652  uint64_t* startTimePtr,
653  ///< [OUT] Start time in seconds (since Jan. 1, 1970)
654 
655  uint64_t* stopTimePtr
656  ///< [OUT] Stop time in seconds (since Jan. 1, 1970)
657 );
658 
659 //--------------------------------------------------------------------------------------------------
660 /**
661  * This function starts the GNSS device.
662  *
663  * @return
664  * - LE_FAULT The function failed.
665  * - LE_DUPLICATE If the GNSS device is already started.
666  * - LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
667  * - LE_OK The function succeeded.
668  *
669  */
670 //--------------------------------------------------------------------------------------------------
672 (
673  void
674 );
675 
676 //--------------------------------------------------------------------------------------------------
677 /**
678  * This function stops the GNSS device.
679  *
680  * @return
681  * - LE_FAULT The function failed.
682  * - LE_DUPLICATE If the GNSS device is already stopped.
683  * - LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
684  * - LE_OK The function succeeded.
685  *
686  */
687 //--------------------------------------------------------------------------------------------------
689 (
690  void
691 );
692 
693 //--------------------------------------------------------------------------------------------------
694 /**
695  * This function performs a "HOT" restart of the GNSS device.
696  *
697  * @return
698  * - LE_FAULT The function failed.
699  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
700  * - LE_OK The function succeeded.
701  *
702  */
703 //--------------------------------------------------------------------------------------------------
705 (
706  void
707 );
708 
709 //--------------------------------------------------------------------------------------------------
710 /**
711  * This function performs a "WARM" restart of the GNSS device.
712  *
713  * @return
714  * - LE_FAULT The function failed.
715  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
716  * - LE_OK The function succeeded.
717  *
718  */
719 //--------------------------------------------------------------------------------------------------
721 (
722  void
723 );
724 
725 //--------------------------------------------------------------------------------------------------
726 /**
727  * This function performs a "COLD" restart of the GNSS device.
728  *
729  * @return
730  * - LE_FAULT The function failed.
731  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
732  * - LE_OK The function succeeded.
733  *
734  */
735 //--------------------------------------------------------------------------------------------------
737 (
738  void
739 );
740 
741 //--------------------------------------------------------------------------------------------------
742 /**
743  * This function performs a "FACTORY" restart of the GNSS device.
744  *
745  * @return
746  * - LE_FAULT The function failed.
747  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
748  * - LE_OK The function succeeded.
749  *
750  */
751 //--------------------------------------------------------------------------------------------------
753 (
754  void
755 );
756 
757 //--------------------------------------------------------------------------------------------------
758 /**
759  * Get the TTFF in milliseconds
760  *
761  * @return
762  * - LE_BUSY The position is not fixed and TTFF can't be measured.
763  * - LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
764  * - LE_OK Function succeeded.
765  *
766  */
767 //--------------------------------------------------------------------------------------------------
769 (
770  uint32_t* ttffPtr
771  ///< [OUT] TTFF in milliseconds
772 );
773 
774 //--------------------------------------------------------------------------------------------------
775 /**
776  * This function enables the GNSS device.
777  *
778  * @return
779  * - LE_FAULT The function failed.
780  * - LE_DUPLICATE If the GNSS device is already enabled.
781  * - LE_NOT_PERMITTED If the GNSS device is not initialized.
782  * - LE_OK The function succeeded.
783  *
784  */
785 //--------------------------------------------------------------------------------------------------
787 (
788  void
789 );
790 
791 //--------------------------------------------------------------------------------------------------
792 /**
793  * This function disables the GNSS device.
794  *
795  * @return
796  * - LE_FAULT The function failed.
797  * - LE_DUPLICATE If the GNSS device is already disabled.
798  * - LE_NOT_PERMITTED If the GNSS device is not initialized or started.
799  * - LE_OK The function succeeded.
800  *
801  */
802 //--------------------------------------------------------------------------------------------------
804 (
805  void
806 );
807 
808 //--------------------------------------------------------------------------------------------------
809 /**
810  * This function sets the GNSS device acquisition rate.
811  *
812  * @return
813  * - LE_OK on success
814  * - LE_FAULT on failure
815  * - LE_UNSUPPORTED request not supported
816  * - LE_TIMEOUT a time-out occurred
817  * - LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
818  */
819 //--------------------------------------------------------------------------------------------------
821 (
822  uint32_t rate
823  ///< [IN] Acquisition rate in milliseconds.
824 );
825 
826 //--------------------------------------------------------------------------------------------------
827 /**
828  * This function gets the GNSS device acquisition rate.
829  *
830  * @return
831  * - LE_OK on success
832  * - LE_FAULT on failure
833  * - LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
834  */
835 //--------------------------------------------------------------------------------------------------
837 (
838  uint32_t* ratePtr
839  ///< [OUT] Acquisition rate in milliseconds.
840 );
841 
842 //--------------------------------------------------------------------------------------------------
843 /**
844  * Add handler function for EVENT 'le_gnss_Position'
845  *
846  * This event provides information on position.
847  *
848  * - A handler reference, which is only needed for later removal of the handler.
849  *
850  * @note Doesn't return on failure, so there's no need to check the return value for errors.
851  */
852 //--------------------------------------------------------------------------------------------------
854 (
856  ///< [IN]
857 
858  void* contextPtr
859  ///< [IN]
860 );
861 
862 //--------------------------------------------------------------------------------------------------
863 /**
864  * Remove handler function for EVENT 'le_gnss_Position'
865  */
866 //--------------------------------------------------------------------------------------------------
868 (
869  le_gnss_PositionHandlerRef_t addHandlerRef
870  ///< [IN]
871 );
872 
873 //--------------------------------------------------------------------------------------------------
874 /**
875  * This function gets the position sample's fix state
876  *
877  * - LE_OK on success
878  * - LE_FAULT on failure
879  *
880  * @note If the caller is passing an invalid Position sample reference into this function,
881  * it is a fatal error, the function will not return.
882  */
883 //--------------------------------------------------------------------------------------------------
885 (
886  le_gnss_SampleRef_t positionSampleRef,
887  ///< [IN] Position sample's reference.
888 
889  le_gnss_FixState_t* statePtr
890  ///< [OUT] Position fix state.
891 );
892 
893 //--------------------------------------------------------------------------------------------------
894 /**
895  * Get the location's data (Latitude, Longitude, Horizontal accuracy).
896  *
897  * @return
898  * - LE_FAULT Function failed to get the location's data
899  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
900  * - LE_OK Function succeeded.
901  *
902  * @note latitudePtr, longitudePtr, hAccuracyPtr, altitudePtr, vAccuracyPtr can be set to NULL
903  * if not needed.
904  *
905  * @note: The latitude and longitude values are based on the WGS84 standard coordinate system.
906  *
907  * @note The latitude and longitude are given in degrees with 6 decimal places like:
908  * Latitude +48858300 = 48.858300 degrees North
909  * Longitude +2294400 = 2.294400 degrees East
910  *
911  * @note Altitude is in metres, above Mean Sea Level, with 3 decimal places (3047 = 3.047 metres).
912  *
913  * @note If the caller is passing an invalid Position sample reference into this function,
914  * it is a fatal error, the function will not return.
915  */
916 //--------------------------------------------------------------------------------------------------
918 (
919  le_gnss_SampleRef_t positionSampleRef,
920  ///< [IN] Position sample's reference.
921 
922  int32_t* latitudePtr,
923  ///< [OUT] WGS84 Latitude in degrees, positive North [resolution 1e-6].
924 
925  int32_t* longitudePtr,
926  ///< [OUT] WGS84 Longitude in degrees, positive East [resolution 1e-6].
927 
928  int32_t* hAccuracyPtr
929  ///< [OUT] Horizontal position's accuracy in metres [resolution 1e-2].
930 );
931 
932 //--------------------------------------------------------------------------------------------------
933 /**
934  * Get the position sample's altitude.
935  *
936  * @return
937  * - LE_FAULT Function failed to get the altitude.
938  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
939  * - LE_OK Function succeeded.
940  *
941  * @note Altitude is in metres, above Mean Sea Level, with 3 decimal places (3047 = 3.047 metres).
942  *
943  * @note For a 2D position fix, the altitude will be indicated as invalid and set to INT32_MAX
944  *
945  * @note If the caller is passing an invalid Position reference into this function,
946  * it is a fatal error, the function will not return.
947  *
948  * @note altitudePtr, altitudeAccuracyPtr can be set to NULL if not needed.
949  */
950 //--------------------------------------------------------------------------------------------------
952 (
953  le_gnss_SampleRef_t positionSampleRef,
954  ///< [IN] Position sample's reference.
955 
956  int32_t* altitudePtr,
957  ///< [OUT] Altitude in metres, above Mean Sea Level [resolution 1e-3].
958 
959  int32_t* vAccuracyPtr
960  ///< [OUT] Vertical position's accuracy in metres [resolution 1e-1].
961 );
962 
963 //--------------------------------------------------------------------------------------------------
964 /**
965  * Get the position sample's time.
966  *
967  * @return
968  * - LE_FAULT Function failed to get the time.
969  * - LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
970  * - LE_OK Function succeeded.
971  *
972  * @note If the caller is passing an invalid Position sample reference into this function,
973  * it is a fatal error, the function will not return.
974  */
975 //--------------------------------------------------------------------------------------------------
977 (
978  le_gnss_SampleRef_t positionSampleRef,
979  ///< [IN] Position sample's reference.
980 
981  uint16_t* hoursPtr,
982  ///< [OUT] UTC Hours into the day [range 0..23].
983 
984  uint16_t* minutesPtr,
985  ///< [OUT] UTC Minutes into the hour [range 0..59].
986 
987  uint16_t* secondsPtr,
988  ///< [OUT] UTC Seconds into the minute [range 0..59].
989 
990  uint16_t* millisecondsPtr
991  ///< [OUT] UTC Milliseconds into the second [range 0..999].
992 );
993 
994 //--------------------------------------------------------------------------------------------------
995 /**
996  * Get the position sample's GPS time.
997  *
998  * @return
999  * - LE_FAULT Function failed to get the time.
1000  * - LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
1001  * - LE_OK Function succeeded.
1002  *
1003  * @note If the caller is passing an invalid Position sample reference into this function,
1004  * it is a fatal error, the function will not return.
1005  */
1006 //--------------------------------------------------------------------------------------------------
1008 (
1009  le_gnss_SampleRef_t positionSampleRef,
1010  ///< [IN] Position sample's reference.
1011 
1012  uint32_t* gpsWeekPtr,
1013  ///< [OUT] GPS week number from midnight, Jan. 6, 1980.
1014 
1015  uint32_t* gpsTimeOfWeekPtr
1016  ///< [OUT] Amount of time in milliseconds into the GPS week.
1017 );
1018 
1019 //--------------------------------------------------------------------------------------------------
1020 /**
1021  * Get the position sample's time accurary.
1022  *
1023  * @return
1024  * - LE_FAULT Function failed to get the time.
1025  * - LE_OUT_OF_RANGE The retrieved time accuracy is invalid (set to UINT16_MAX).
1026  * - LE_OK Function succeeded.
1027  *
1028  * @note If the caller is passing an invalid Position sample reference into this function,
1029  * it is a fatal error, the function will not return.
1030  */
1031 //--------------------------------------------------------------------------------------------------
1033 (
1034  le_gnss_SampleRef_t positionSampleRef,
1035  ///< [IN] Position sample's reference.
1036 
1037  uint32_t* timeAccuracyPtr
1038  ///< [OUT] Estimated time accuracy in milliseconds
1039 );
1040 
1041 //--------------------------------------------------------------------------------------------------
1042 /**
1043  * Get the position sample's date.
1044  *
1045  * @return
1046  * - LE_FAULT Function failed to get the date.
1047  * - LE_OUT_OF_RANGE The retrieved date is invalid (all fields are set to 0).
1048  * - LE_OK Function succeeded.
1049  *
1050  * @note If the caller is passing an invalid Position sample reference into this function,
1051  * it is a fatal error, the function will not return.
1052  */
1053 //--------------------------------------------------------------------------------------------------
1055 (
1056  le_gnss_SampleRef_t positionSampleRef,
1057  ///< [IN] Position sample's reference.
1058 
1059  uint16_t* yearPtr,
1060  ///< [OUT] UTC Year A.D. [e.g. 2014].
1061 
1062  uint16_t* monthPtr,
1063  ///< [OUT] UTC Month into the year [range 1...12].
1064 
1065  uint16_t* dayPtr
1066  ///< [OUT] UTC Days into the month [range 1...31].
1067 );
1068 
1069 //--------------------------------------------------------------------------------------------------
1070 /**
1071  * Get the position sample's horizontal speed.
1072  *
1073  * - LE_FAULT Function failed to find the positionSample.
1074  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to UINT32_MAX).
1075  * - LE_OK Function succeeded.
1076  *
1077  * @note hSpeedPtr, hSpeedAccuracyPtr can be set to NULL if not needed.
1078  *
1079  * @note If the caller is passing an invalid Position sample reference into this function,
1080  * it is a fatal error, the function will not return.
1081  */
1082 //--------------------------------------------------------------------------------------------------
1084 (
1085  le_gnss_SampleRef_t positionSampleRef,
1086  ///< [IN] Position sample's reference.
1087 
1088  uint32_t* hspeedPtr,
1089  ///< [OUT] Horizontal speed in meters/second [resolution 1e-2].
1090 
1091  uint32_t* hspeedAccuracyPtr
1092  ///< [OUT] Horizontal speed's accuracy estimate
1093  ///< in meters/second [resolution 1e-1].
1094 );
1095 
1096 //--------------------------------------------------------------------------------------------------
1097 /**
1098  * Get the position sample's vertical speed.
1099  *
1100  * @return
1101  * - LE_FAULT The function failed to find the positionSample.
1102  * - LE_OUT_OF_RANGE One of the retrieved parameter is not valid (set to INT32_MAX).
1103  * - LE_OK The function succeeded.
1104  *
1105  * @note vSpeedPtr, vSpeedAccuracyPtr can be set to NULL if not needed.
1106  *
1107  * @note For a 2D position Fix, the vertical speed will be indicated as invalid
1108  * and set to INT32_MAX.
1109  *
1110  * @note If the caller is passing an invalid Position sample reference into this function,
1111  * it is a fatal error, the function will not return.
1112  */
1113 //--------------------------------------------------------------------------------------------------
1115 (
1116  le_gnss_SampleRef_t positionSampleRef,
1117  ///< [IN] Position sample's reference.
1118 
1119  int32_t* vspeedPtr,
1120  ///< [OUT] Vertical speed in meters/second [resolution 1e-2].
1121 
1122  int32_t* vspeedAccuracyPtr
1123  ///< [OUT] Vertical speed's accuracy estimate
1124  ///< in meters/second [resolution 1e-1].
1125 );
1126 
1127 //--------------------------------------------------------------------------------------------------
1128 /**
1129  * Get the position sample's direction. Direction of movement is the
1130  * direction that the vehicle/person is actually moving.
1131  *
1132  * @return
1133  * - LE_FAULT Function failed to find the positionSample.
1134  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
1135  * - LE_OK Function succeeded.
1136  *
1137  * @note directionPtr, directionAccuracyPtr can be set to NULL if not needed.
1138  *
1139  * @note If the caller is passing an invalid Position sample reference into this function,
1140  * it is a fatal error, the function will not return.
1141  */
1142 //--------------------------------------------------------------------------------------------------
1144 (
1145  le_gnss_SampleRef_t positionSampleRef,
1146  ///< [IN] Position sample's reference.
1147 
1148  int32_t* directionPtr,
1149  ///< [OUT] Direction in degrees [resolution 1e-1].
1150  ///< (where 0 is True North)
1151 
1152  int32_t* directionAccuracyPtr
1153  ///< [OUT] Direction's accuracy estimate
1154  ///< in degrees [resolution 1e-1].
1155 );
1156 
1157 //--------------------------------------------------------------------------------------------------
1158 /**
1159  * Get the Satellites Vehicle information.
1160  *
1161  * @return
1162  * - LE_FAULT Function failed to find the positionSample.
1163  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid.
1164  * - LE_OK Function succeeded.
1165  *
1166  * @note satId[] can be set to 0 if that information list index is not configured, so
1167  * all satellite parameters (satConst[], satSnr[],satAzim[], satElev[]) are fixed to 0.
1168  *
1169  * @note For LE_OUT_OF_RANGE returned code, invalid value depends on field type:
1170  * UINT16_MAX for satId, LE_GNSS_SV_CONSTELLATION_UNDEFINED for satConst, false for satUsed,
1171  * UINT8_MAX for satSnr, UINT16_MAX for satAzim, UINT8_MAX for satElev.
1172  *
1173  * @note If the caller is passing an invalid Position sample reference into this function,
1174  * it is a fatal error, the function will not return.
1175  */
1176 //--------------------------------------------------------------------------------------------------
1178 (
1179  le_gnss_SampleRef_t positionSampleRef,
1180  ///< [IN] Position sample's reference.
1181 
1182  uint16_t* satIdPtr,
1183  ///< [OUT] Satellites in View ID number, referring
1184  ///< to NMEA standard.
1185 
1186  size_t* satIdNumElementsPtr,
1187  ///< [INOUT]
1188 
1189  le_gnss_Constellation_t* satConstPtr,
1190  ///< [OUT] GNSS constellation type.
1191 
1192  size_t* satConstNumElementsPtr,
1193  ///< [INOUT]
1194 
1195  bool* satUsedPtr,
1196  ///< [OUT] TRUE if satellite in View Used
1197  ///< for Navigation.
1198 
1199  size_t* satUsedNumElementsPtr,
1200  ///< [INOUT]
1201 
1202  uint8_t* satSnrPtr,
1203  ///< [OUT] Satellites in View Signal To
1204  ///< Noise Ratio [dBHz].
1205 
1206  size_t* satSnrNumElementsPtr,
1207  ///< [INOUT]
1208 
1209  uint16_t* satAzimPtr,
1210  ///< [OUT] Satellites in View Azimuth [degrees].
1211  ///< Range: 0 to 360
1212  ///< If Azimuth angle is currently unknown,
1213  ///< the value is set to UINT16_MAX.
1214 
1215  size_t* satAzimNumElementsPtr,
1216  ///< [INOUT]
1217 
1218  uint8_t* satElevPtr,
1219  ///< [OUT] Satellites in View Elevation [degrees].
1220  ///< Range: 0 to 90
1221  ///< If Elevation angle is currently unknown,
1222  ///< the value is set to UINT8_MAX.
1223 
1224  size_t* satElevNumElementsPtr
1225  ///< [INOUT]
1226 );
1227 
1228 //--------------------------------------------------------------------------------------------------
1229 /**
1230  * Get the Satellites Vehicle status.
1231  *
1232  * @return
1233  * - LE_FAULT Function failed to find the positionSample.
1234  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid.
1235  * - LE_OK Function succeeded.
1236  *
1237  * @note If the caller is passing an invalid Position sample reference into this function,
1238  * it is a fatal error, the function will not return.
1239  */
1240 //--------------------------------------------------------------------------------------------------
1242 (
1243  le_gnss_SampleRef_t positionSampleRef,
1244  ///< [IN] Position sample's reference.
1245 
1246  uint8_t* satsInViewCountPtr,
1247  ///< [OUT] Number of satellites expected to be in view.
1248 
1249  uint8_t* satsTrackingCountPtr,
1250  ///< [OUT] Number of satellites in view, when tracking.
1251 
1252  uint8_t* satsUsedCountPtr
1253  ///< [OUT] Number of satellites in view used for Navigation.
1254 );
1255 
1256 //--------------------------------------------------------------------------------------------------
1257 /**
1258  * Get the DOP parameters (Dilution Of Precision) for the fixed position.
1259  *
1260  * @return
1261  * - LE_FAULT Function failed to find the positionSample.
1262  * - LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT16_MAX).
1263  * - LE_OK Function succeeded.
1264  *
1265  * @note The DOP values are given with 3 decimal places like: DOP value 2200 = 2.20
1266  *
1267  * @note If the caller is passing an invalid Position sample reference into this function,
1268  * it is a fatal error, the function will not return.
1269  */
1270 //--------------------------------------------------------------------------------------------------
1272 (
1273  le_gnss_SampleRef_t positionSampleRef,
1274  ///< [IN] Position sample's reference.
1275 
1276  uint16_t* hdopPtr,
1277  ///< [OUT] Horizontal Dilution of Precision [resolution 1e-3].
1278 
1279  uint16_t* vdopPtr,
1280  ///< [OUT] Vertical Dilution of Precision [resolution 1e-3].
1281 
1282  uint16_t* pdopPtr
1283  ///< [OUT] Position Dilution of Precision [resolution 1e-3].
1284 );
1285 
1286 //--------------------------------------------------------------------------------------------------
1287 /**
1288  * This function must be called to release the position sample.
1289  *
1290  * @note If the caller is passing an invalid Position sample reference into this function,
1291  * it is a fatal error, the function will not return.
1292  */
1293 //--------------------------------------------------------------------------------------------------
1295 (
1296  le_gnss_SampleRef_t positionSampleRef
1297  ///< [IN] Position sample's reference.
1298 );
1299 
1300 //--------------------------------------------------------------------------------------------------
1301 /**
1302  * This function sets the SUPL Assisted-GNSS mode.
1303  *
1304  * @return
1305  * - LE_OK on success
1306  * - LE_FAULT on failure
1307  * - LE_UNSUPPORTED request not supported
1308  * - LE_TIMEOUT a time-out occurred
1309  */
1310 //--------------------------------------------------------------------------------------------------
1312 (
1313  le_gnss_AssistedMode_t assistedMode
1314  ///< [IN] Assisted-GNSS mode.
1315 );
1316 
1317 //--------------------------------------------------------------------------------------------------
1318 /**
1319  * This function gets the SUPL Assisted-GNSS mode.
1320  *
1321  * @return
1322  * - LE_OK on success
1323  * - LE_FAULT on failure
1324  */
1325 //--------------------------------------------------------------------------------------------------
1327 (
1328  le_gnss_AssistedMode_t* assistedModePtr
1329  ///< [OUT] Assisted-GNSS mode.
1330 );
1331 
1332 //--------------------------------------------------------------------------------------------------
1333 /**
1334  * This function sets the SUPL server URL.
1335  * That server URL is a NULL-terminated string with a maximum string length (including NULL
1336  * terminator) equal to 256. Optionally the port number is specified after a colon.
1337  *
1338  * @return
1339  * - LE_OK on success
1340  * - LE_FAULT on failure
1341  * - LE_BUSY service is busy
1342  * - LE_TIMEOUT a time-out occurred
1343  */
1344 //--------------------------------------------------------------------------------------------------
1346 (
1347  const char* suplServerUrl
1348  ///< [IN] SUPL server URL.
1349 );
1350 
1351 //--------------------------------------------------------------------------------------------------
1352 /**
1353  * This function injects the SUPL certificate to be used in A-GNSS sessions.
1354  *
1355  * @return
1356  * - LE_OK on success
1357  * - LE_FAULT on failure
1358  * - LE_BUSY service is busy
1359  * - LE_TIMEOUT a time-out occurred
1360  */
1361 //--------------------------------------------------------------------------------------------------
1363 (
1364  uint8_t suplCertificateId,
1365  ///< [IN] ID of the SUPL certificate.
1366  ///< Certificate ID range is 0 to 9
1367 
1368  uint16_t suplCertificateLen,
1369  ///< [IN] SUPL certificate size in Bytes.
1370 
1371  const char* suplCertificate
1372  ///< [IN] SUPL certificate contents.
1373 );
1374 
1375 //--------------------------------------------------------------------------------------------------
1376 /**
1377  * This function deletes the SUPL certificate.
1378  *
1379  * @return
1380  * - LE_OK on success
1381  * - LE_FAULT on failure
1382  * - LE_BUSY service is busy
1383  * - LE_TIMEOUT a time-out occurred
1384  */
1385 //--------------------------------------------------------------------------------------------------
1387 (
1388  uint8_t suplCertificateId
1389  ///< [IN] ID of the SUPL certificate.
1390  ///< Certificate ID range is 0 to 9
1391 );
1392 
1393 
1394 #endif // LE_GNSS_INTERFACE_H_INCLUDE_GUARD
1395 
le_gnss_AssistedMode_t
Definition: le_gnss_interface.h:498
le_result_t le_gnss_InjectSuplCertificate(uint8_t suplCertificateId, uint16_t suplCertificateLen, const char *suplCertificate)
le_result_t le_gnss_GetAltitude(le_gnss_SampleRef_t positionSampleRef, int32_t *altitudePtr, int32_t *vAccuracyPtr)
le_result_t le_gnss_SetSuplServerUrl(const char *suplServerUrl)
void(* le_gnss_PositionHandlerFunc_t)(le_gnss_SampleRef_t positionSampleRef, void *contextPtr)
Definition: le_gnss_interface.h:555
Satellite Vehicle of Galileo constellation.
Definition: le_gnss_interface.h:484
le_result_t le_gnss_GetExtendedEphemerisValidity(uint64_t *startTimePtr, uint64_t *stopTimePtr)
le_result_t
Definition: le_basics.h:35
void le_gnss_RemovePositionHandler(le_gnss_PositionHandlerRef_t addHandlerRef)
le_result_t le_gnss_Start(void)
Standalone mode.
Definition: le_gnss_interface.h:500
le_gnss_PositionHandlerRef_t le_gnss_AddPositionHandler(le_gnss_PositionHandlerFunc_t handlerPtr, void *contextPtr)
GLONASS constellation used in solution.
Definition: le_gnss_interface.h:524
le_result_t le_gnss_ForceFactoryRestart(void)
struct le_gnss_Sample * le_gnss_SampleRef_t
Definition: le_gnss_interface.h:398
le_result_t le_gnss_LoadExtendedEphemerisFile(int fd)
le_result_t le_gnss_GetAcquisitionRate(uint32_t *ratePtr)
void le_gnss_DisconnectService(void)
Satellite Vehicle of GPS constellation.
Definition: le_gnss_interface.h:475
BEIDOU constellation used in solution.
Definition: le_gnss_interface.h:527
le_result_t le_gnss_GetDirection(le_gnss_SampleRef_t positionSampleRef, int32_t *directionPtr, int32_t *directionAccuracyPtr)
le_result_t le_gnss_ForceColdRestart(void)
Estimated (i.e. forward predicted) position fix.
Definition: le_gnss_interface.h:459
le_result_t le_gnss_ForceWarmRestart(void)
Satellite Vehicle of Glonass constellation.
Definition: le_gnss_interface.h:481
le_result_t le_gnss_GetTtff(uint32_t *ttffPtr)
le_result_t le_gnss_GetConstellation(le_gnss_ConstellationBitMask_t *constellationMaskPtr)
Maximum value.
Definition: le_gnss_interface.h:487
le_result_t le_gnss_EnableExtendedEphemerisFile(void)
3-Dimensional position fix.
Definition: le_gnss_interface.h:456
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)
le_result_t le_gnss_TryConnectService(void)
le_result_t le_gnss_SetAcquisitionRate(uint32_t rate)
le_result_t le_gnss_DeleteSuplCertificate(uint8_t suplCertificateId)
GPS constellation used in solution.
Definition: le_gnss_interface.h:521
le_gnss_FixState_t
Definition: le_gnss_interface.h:448
2-Dimensional position fix.
Definition: le_gnss_interface.h:453
void le_gnss_ReleaseSampleRef(le_gnss_SampleRef_t positionSampleRef)
Satellite Vehicle of SBAS constellation.
Definition: le_gnss_interface.h:478
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:506
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:519
le_result_t le_gnss_GetSatellitesInfo(le_gnss_SampleRef_t positionSampleRef, uint16_t *satIdPtr, size_t *satIdNumElementsPtr, le_gnss_Constellation_t *satConstPtr, size_t *satConstNumElementsPtr, bool *satUsedPtr, size_t *satUsedNumElementsPtr, uint8_t *satSnrPtr, size_t *satSnrNumElementsPtr, uint16_t *satAzimPtr, size_t *satAzimNumElementsPtr, uint8_t *satElevPtr, size_t *satElevNumElementsPtr)
void le_gnss_ConnectService(void)
le_result_t le_gnss_GetSatellitesStatus(le_gnss_SampleRef_t positionSampleRef, uint8_t *satsInViewCountPtr, uint8_t *satsTrackingCountPtr, uint8_t *satsUsedCountPtr)
GALILEO constellation used in solution.
Definition: le_gnss_interface.h:530
le_result_t le_gnss_Stop(void)
le_result_t le_gnss_GetPositionState(le_gnss_SampleRef_t positionSampleRef, le_gnss_FixState_t *statePtr)
le_result_t le_gnss_Disable(void)
le_result_t le_gnss_GetHorizontalSpeed(le_gnss_SampleRef_t positionSampleRef, uint32_t *hspeedPtr, uint32_t *hspeedAccuracyPtr)
le_result_t le_gnss_SetConstellation(le_gnss_ConstellationBitMask_t constellationMask)
GNSS constellation field not defined.
Definition: le_gnss_interface.h:472
le_result_t le_gnss_ForceHotRestart(void)
MS-Based mode.
Definition: le_gnss_interface.h:503
le_result_t le_gnss_Enable(void)
le_result_t le_gnss_GetGpsTime(le_gnss_SampleRef_t positionSampleRef, uint32_t *gpsWeekPtr, uint32_t *gpsTimeOfWeekPtr)
The GNSS fix position is not fixed.
Definition: le_gnss_interface.h:450
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:541
le_gnss_Constellation_t
Definition: le_gnss_interface.h:470
le_result_t le_gnss_GetDop(le_gnss_SampleRef_t positionSampleRef, uint16_t *hdopPtr, uint16_t *vdopPtr, uint16_t *pdopPtr)