le_gnss_common.h

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