le_gnss_interface.h
Go to the documentation of this file.
22 * GNSS or Global Navigation Satellite System is a satellite navigation system with global coverage.96 * The le_gnss_ForceHotRestart() function performs a "HOT" restart of the GNSS device. The current101 * The le_gnss_ForceWarmRestart() function performs a "WARM" restart of the GNSS device. The current106 * The le_gnss_ForceColdRestart() function performs a "COLD" restart of the GNSS device. The current147 * @ref le_gnss_NMEA with a bit mask. The supported values are listed in @ref le_gnss_NmeaBitMask_t.154 * The le_gnss_GetNmeaSentences() function gets the bit mask of the enabled NMEA sentences in the164 * ''LE_OK or error code'' means the function is authorized in the corresponding state, the request165 * is performed and the result is returned; otherwise the returned error is indicated for each state168 *| ----------------------------- | --------------------------- | -----------------------------| --------------------------- | --------------------------- |171 *| le_gnss_ForceHotRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |172 *| le_gnss_ForceWarmRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |173 *| le_gnss_ForceColdRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |174 *| le_gnss_ForceFactoryRestart() | LE_NOT_PERMITTED | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED |175 *| le_gnss_Disable() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_DUPLICATE |177 *| le_gnss_SetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |178 *| le_gnss_GetConstellation() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |179 *| le_gnss_GetTtff() | LE_NOT_PERMITTED | LE_OK or error code | LE_OK or error code | LE_NOT_PERMITTED |180 *| le_gnss_SetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |181 *| le_gnss_GetAcquisitionRate() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |182 *| le_gnss_SetNmeaSentences() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |183 *| le_gnss_GetNmeaSentences() | LE_NOT_PERMITTED | LE_OK or error code | LE_NOT_PERMITTED | LE_NOT_PERMITTED |254 * With le_gnss_GetExtendedEphemerisValidity(), you will to get the validity of the last injected267 * That 3GPP User Plane A-GNSS (Assisted GNSS) protocol is defined by two different standardization268 * bodies, 3GPP and Open Mobile Alliance (OMA). For more information, please refer to the standard.273 *, then returns the retrieved GNSS data to the SUPL (Secure User Plan Location) server, where the277 * server. The MS measures the signals from the GNSS satellites and makes the position calculation.290 * The SUPL server is configured using the le_gnss_SetSuplServerUrl() function. That function sets294 * le_gnss_InjectSuplCertificate() function and deleted through the le_gnss_DeleteSuplCertificate()361 //--------------------------------------------------------------------------------------------------364 * Connect the current client thread to the service providing this API. Block until the service is367 * For each thread that wants to use this API, either ConnectService or TryConnectService must be368 * called before any other functions in this API. Normally, ConnectService is automatically called373 //--------------------------------------------------------------------------------------------------379 //--------------------------------------------------------------------------------------------------382 * Try to connect the current client thread to the service providing this API. Return with an error385 * For each thread that wants to use this API, either ConnectService or TryConnectService must be386 * called before any other functions in this API. Normally, ConnectService is automatically called393 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.394 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).397 //--------------------------------------------------------------------------------------------------403 //--------------------------------------------------------------------------------------------------409 * longer a connection to the service, and the functions in this API can't be used. For details, see414 //--------------------------------------------------------------------------------------------------421 //--------------------------------------------------------------------------------------------------425 //--------------------------------------------------------------------------------------------------429 //--------------------------------------------------------------------------------------------------433 //--------------------------------------------------------------------------------------------------437 //--------------------------------------------------------------------------------------------------442 //--------------------------------------------------------------------------------------------------446 //--------------------------------------------------------------------------------------------------450 //--------------------------------------------------------------------------------------------------454 //--------------------------------------------------------------------------------------------------459 //--------------------------------------------------------------------------------------------------463 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------471 //--------------------------------------------------------------------------------------------------477 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------485 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------539 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------558 //--------------------------------------------------------------------------------------------------564 //--------------------------------------------------------------------------------------------------586 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------646 //--------------------------------------------------------------------------------------------------650 //--------------------------------------------------------------------------------------------------654 //--------------------------------------------------------------------------------------------------663 //--------------------------------------------------------------------------------------------------665 (670 //--------------------------------------------------------------------------------------------------680 //--------------------------------------------------------------------------------------------------687 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------702 //--------------------------------------------------------------------------------------------------711 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------726 //--------------------------------------------------------------------------------------------------732 //--------------------------------------------------------------------------------------------------743 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------759 //--------------------------------------------------------------------------------------------------769 //--------------------------------------------------------------------------------------------------780 //--------------------------------------------------------------------------------------------------786 //--------------------------------------------------------------------------------------------------797 //--------------------------------------------------------------------------------------------------803 //--------------------------------------------------------------------------------------------------813 //--------------------------------------------------------------------------------------------------819 //--------------------------------------------------------------------------------------------------829 //--------------------------------------------------------------------------------------------------835 //--------------------------------------------------------------------------------------------------845 //--------------------------------------------------------------------------------------------------851 //--------------------------------------------------------------------------------------------------861 //--------------------------------------------------------------------------------------------------867 //--------------------------------------------------------------------------------------------------877 //--------------------------------------------------------------------------------------------------884 //--------------------------------------------------------------------------------------------------895 //--------------------------------------------------------------------------------------------------901 //--------------------------------------------------------------------------------------------------912 //--------------------------------------------------------------------------------------------------918 //--------------------------------------------------------------------------------------------------929 * @warning This function may be subject to limitations depending on the platform. Please refer to932 //--------------------------------------------------------------------------------------------------939 //--------------------------------------------------------------------------------------------------948 //--------------------------------------------------------------------------------------------------955 //--------------------------------------------------------------------------------------------------965 //--------------------------------------------------------------------------------------------------975 //--------------------------------------------------------------------------------------------------979 //--------------------------------------------------------------------------------------------------986 //--------------------------------------------------------------------------------------------------996 //--------------------------------------------------------------------------------------------------1006 //--------------------------------------------------------------------------------------------------1027 //--------------------------------------------------------------------------------------------------1043 //--------------------------------------------------------------------------------------------------1052 * @note Altitude is in meters, above Mean Sea Level, with 3 decimal places (3047 = 3.047 meters).1061 //--------------------------------------------------------------------------------------------------1074 //--------------------------------------------------------------------------------------------------1086 //--------------------------------------------------------------------------------------------------1105 //--------------------------------------------------------------------------------------------------1117 //--------------------------------------------------------------------------------------------------1130 //--------------------------------------------------------------------------------------------------1142 //--------------------------------------------------------------------------------------------------1152 //--------------------------------------------------------------------------------------------------1164 //--------------------------------------------------------------------------------------------------1180 //--------------------------------------------------------------------------------------------------1193 //--------------------------------------------------------------------------------------------------1207 //--------------------------------------------------------------------------------------------------1224 //--------------------------------------------------------------------------------------------------1239 //--------------------------------------------------------------------------------------------------1241 * Get the position sample's direction. Direction of movement is the direction that the vehicle or1257 //--------------------------------------------------------------------------------------------------1272 //--------------------------------------------------------------------------------------------------1291 //--------------------------------------------------------------------------------------------------1343 //--------------------------------------------------------------------------------------------------1355 //--------------------------------------------------------------------------------------------------1371 //--------------------------------------------------------------------------------------------------1385 //--------------------------------------------------------------------------------------------------1401 //--------------------------------------------------------------------------------------------------1413 * @note For a 2D position fix, the altitude with respect to the WGS-84 ellipsoid will be indicated1419 //--------------------------------------------------------------------------------------------------1430 //--------------------------------------------------------------------------------------------------1446 //--------------------------------------------------------------------------------------------------1456 //--------------------------------------------------------------------------------------------------1466 //--------------------------------------------------------------------------------------------------1472 //--------------------------------------------------------------------------------------------------1479 //--------------------------------------------------------------------------------------------------1486 //--------------------------------------------------------------------------------------------------1496 //--------------------------------------------------------------------------------------------------1503 //--------------------------------------------------------------------------------------------------1511 //--------------------------------------------------------------------------------------------------1518 //--------------------------------------------------------------------------------------------------1530 //--------------------------------------------------------------------------------------------------1537 //--------------------------------------------------------------------------------------------------1549 //--------------------------------------------------------------------------------------------------1563 //--------------------------------------------------------------------------------------------------1573 //--------------------------------------------------------------------------------------------------1581 //--------------------------------------------------------------------------------------------------1593 * @warning This function may be subject to limitations depending on the platform. Please refer to1596 //--------------------------------------------------------------------------------------------------1603 //--------------------------------------------------------------------------------------------------1617 //--------------------------------------------------------------------------------------------------le_result_t le_gnss_InjectSuplCertificate(uint8_t suplCertificateId, uint16_t suplCertificateLen, const char *suplCertificate)le_result_t le_gnss_GetDirection(le_gnss_SampleRef_t positionSampleRef, uint32_t *directionPtr, uint32_t *directionAccuracyPtr)le_result_t le_gnss_GetAltitude(le_gnss_SampleRef_t positionSampleRef, int32_t *altitudePtr, int32_t *vAccuracyPtr)le_result_t le_gnss_SetSuplServerUrl(const char *suplServerUrl)void(* le_gnss_PositionHandlerFunc_t)(le_gnss_SampleRef_t positionSampleRef, void *contextPtr)Definition: le_gnss_interface.h:665Definition: le_gnss_interface.h:525le_result_t le_gnss_GetExtendedEphemerisValidity(uint64_t *startTimePtr, uint64_t *stopTimePtr)GNGSA type enabled: GNSS DOP and active satellites.Definition: le_gnss_interface.h:619void le_gnss_RemovePositionHandler(le_gnss_PositionHandlerRef_t addHandlerRef)le_result_t le_gnss_Start(void)le_gnss_PositionHandlerRef_t le_gnss_AddPositionHandler(le_gnss_PositionHandlerFunc_t handlerPtr, void *contextPtr)Definition: le_gnss_interface.h:571le_result_t le_gnss_ForceFactoryRestart(void)le_result_t le_gnss_LoadExtendedEphemerisFile(int fd)PSTIS type enabled: GPS session start indication.Definition: le_gnss_interface.h:637le_result_t le_gnss_GetAcquisitionRate(uint32_t *ratePtr)void le_gnss_DisconnectService(void)Definition: le_gnss_interface.h:513Definition: le_gnss_interface.h:529Definition: le_gnss_interface.h:575le_result_t le_gnss_ForceColdRestart(void)GAGSA type enabled: Galileo DOP and active satellites.Definition: le_gnss_interface.h:625Estimated (i.e. forward predicted) position fix.Definition: le_gnss_interface.h:497le_result_t le_gnss_ForceWarmRestart(void)GPGSV type enabled: GPS satellites in view.Definition: le_gnss_interface.h:604Definition: le_gnss_interface.h:521le_result_t le_gnss_GetTtff(uint32_t *ttffPtr)le_result_t le_gnss_GetConstellation(le_gnss_ConstellationBitMask_t *constellationMaskPtr)le_result_t le_gnss_EnableExtendedEphemerisFile(void)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)GAVTG type enabled: Galileo vector track and speed over the ground.Definition: le_gnss_interface.h:634le_result_t le_gnss_TryConnectService(void)le_result_t le_gnss_SetAcquisitionRate(uint32_t rate)le_result_t le_gnss_DeleteSuplCertificate(uint8_t suplCertificateId)Definition: le_gnss_interface.h:567le_result_t le_gnss_GetMagneticDeviation(le_gnss_SampleRef_t positionSampleRef, int32_t *magneticDeviationPtr)void le_gnss_ReleaseSampleRef(le_gnss_SampleRef_t positionSampleRef)Definition: le_gnss_interface.h:517le_result_t le_gnss_GetNmeaSentences(le_gnss_NmeaBitMask_t *nmeaMaskPtrPtr)le_result_t le_gnss_GetVerticalSpeed(le_gnss_SampleRef_t positionSampleRef, int32_t *vspeedPtr, int32_t *vspeedAccuracyPtr)le_result_t le_gnss_SetSuplAssistedMode(le_gnss_AssistedMode_t assistedMode)le_result_t le_gnss_GetDate(le_gnss_SampleRef_t positionSampleRef, uint16_t *yearPtr, uint16_t *monthPtr, uint16_t *dayPtr)GPVTG type enabled: GPS vector track and speed over the ground.Definition: le_gnss_interface.h:610le_result_t le_gnss_GetSatellitesInfo(le_gnss_SampleRef_t positionSampleRef, uint16_t *satIdPtr, size_t *satIdNumElementsPtr, le_gnss_Constellation_t *satConstPtr, size_t *satConstNumElementsPtr, bool *satUsedPtr, size_t *satUsedNumElementsPtr, uint8_t *satSnrPtr, size_t *satSnrNumElementsPtr, uint16_t *satAzimPtr, size_t *satAzimNumElementsPtr, uint8_t *satElevPtr, size_t *satElevNumElementsPtr)void le_gnss_ConnectService(void)GPRMC type enabled: GPS recommended minimum data.Definition: le_gnss_interface.h:607le_result_t le_gnss_GetSatellitesStatus(le_gnss_SampleRef_t positionSampleRef, uint8_t *satsInViewCountPtr, uint8_t *satsTrackingCountPtr, uint8_t *satsUsedCountPtr)PQXFI type enabled: Proprietary Qualcomm eXtended Fix Information.Definition: le_gnss_interface.h:640Definition: le_gnss_interface.h:579le_result_t le_gnss_Stop(void)le_result_t le_gnss_SetNmeaSentences(le_gnss_NmeaBitMask_t nmeaMask)le_result_t le_gnss_GetPositionState(le_gnss_SampleRef_t positionSampleRef, le_gnss_FixState_t *statePtr)le_result_t le_gnss_Disable(void)le_result_t le_gnss_GetHorizontalSpeed(le_gnss_SampleRef_t positionSampleRef, uint32_t *hspeedPtr, uint32_t *hspeedAccuracyPtr)le_gnss_SampleRef_t le_gnss_GetLastSampleRef(void)le_result_t le_gnss_SetConstellation(le_gnss_ConstellationBitMask_t constellationMask)GNSS constellation field not defined.Definition: le_gnss_interface.h:510le_result_t le_gnss_ForceHotRestart(void)le_result_t le_gnss_Enable(void)le_result_t le_gnss_GetGpsTime(le_gnss_SampleRef_t positionSampleRef, uint32_t *gpsWeekPtr, uint32_t *gpsTimeOfWeekPtr)GPGSA type enabled: GPS DOP and active satellites.Definition: le_gnss_interface.h:601GLGSV type enabled: GLONASS satellites in view.Definition: le_gnss_interface.h:613GAGSV type enabled: Galileo satellites in view.Definition: le_gnss_interface.h:628le_result_t le_gnss_GetTimeAccuracy(le_gnss_SampleRef_t positionSampleRef, uint32_t *timeAccuracyPtr)struct le_gnss_PositionHandler * le_gnss_PositionHandlerRef_tDefinition: le_gnss_interface.h:651GARMC type enabled: Galileo recommended minimum data.Definition: le_gnss_interface.h:631le_result_t le_gnss_GetDop(le_gnss_SampleRef_t positionSampleRef, uint16_t *hdopPtr, uint16_t *vdopPtr, uint16_t *pdopPtr)