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