#include "legato.h"
Go to the source code of this file.
Macros | |
#define | LE_GNSS_MAX_SUPL_SERVER_URL_LEN 256 |
#define | LE_GNSS_MAX_SUPL_CERTIFICATE_LEN 2000 |
#define | LE_GNSS_MAX_SV_INFO_NUMBER 80 |
Typedefs | |
typedef struct le_gnss_Sample * | le_gnss_SampleRef_t |
typedef struct le_gnss_PositionHandler * | le_gnss_PositionHandlerRef_t |
typedef void(* | le_gnss_PositionHandlerFunc_t) (le_gnss_SampleRef_t positionSampleRef, void *contextPtr) |
Legato GNSS include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
#define LE_GNSS_MAX_SUPL_CERTIFICATE_LEN 2000 |
Maximum SUPL certificate size.
#define LE_GNSS_MAX_SUPL_SERVER_URL_LEN 256 |
Maximum length of the SUP Server URL string.
#define LE_GNSS_MAX_SV_INFO_NUMBER 80 |
Define the maximum length of the Satellites Vehicle information list
typedef void(* le_gnss_PositionHandlerFunc_t) (le_gnss_SampleRef_t positionSampleRef, void *contextPtr) |
Handler for position information.
positionSampleRef | Position's sample reference |
contextPtr |
typedef struct le_gnss_PositionHandler* le_gnss_PositionHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_gnss_Position'
typedef struct le_gnss_Sample* le_gnss_SampleRef_t |
Reference type for dealing with GNSS position samples.
enum le_gnss_FixState_t |
le_gnss_PositionHandlerRef_t le_gnss_AddPositionHandler | ( | le_gnss_PositionHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_gnss_Position'
This event provides information on position.
[in] | handlerPtr | |
[in] | contextPtr |
void le_gnss_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API.
This function must be called before any other functions in this API. Normally, it's automatically called for the main thread, but must be explicitly called for other threads. For details, see Client-specific Functions.
This function is created automatically.
le_result_t le_gnss_DeleteSuplCertificate | ( | uint8_t | suplCertificateId | ) |
This function deletes the SUPL certificate.
[in] | suplCertificateId | Certificate ID of the SUPL certificate. Certificate ID range is 0 to 9 |
le_result_t le_gnss_Disable | ( | void | ) |
This function disables the GNSS device.
le_result_t le_gnss_DisableExtendedEphemerisFile | ( | void | ) |
This function disables the use of the 'Extended Ephemeris' file into the GNSS device.
void le_gnss_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
le_result_t le_gnss_Enable | ( | void | ) |
This function enables the GNSS device.
le_result_t le_gnss_EnableExtendedEphemerisFile | ( | void | ) |
This function enables the use of the 'Extended Ephemeris' file into the GNSS device.
le_result_t le_gnss_ForceColdRestart | ( | void | ) |
This function performs a "COLD" restart of the GNSS device.
le_result_t le_gnss_ForceFactoryRestart | ( | void | ) |
This function performs a "FACTORY" restart of the GNSS device.
le_result_t le_gnss_ForceHotRestart | ( | void | ) |
This function performs a "HOT" restart of the GNSS device.
le_result_t le_gnss_ForceWarmRestart | ( | void | ) |
This function performs a "WARM" restart of the GNSS device.
le_result_t le_gnss_GetAcquisitionRate | ( | uint32_t * | ratePtr | ) |
This function gets the GNSS device acquisition rate.
[out] | ratePtr | Acquisition rate in milliseconds. |
le_result_t le_gnss_GetAltitude | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | altitudePtr, | ||
int32_t * | vAccuracyPtr | ||
) |
Get the position sample's altitude.
[in] | positionSampleRef | Position sample's reference. |
[out] | altitudePtr | Altitude in metres, above Mean Sea Level [resolution 1e-3]. |
[out] | vAccuracyPtr | Vertical position's accuracy in metres [resolution 1e-1]. |
le_result_t le_gnss_GetConstellation | ( | le_gnss_ConstellationBitMask_t * | constellationMaskPtr | ) |
Get the GNSS constellation bit mask
[out] | constellationMaskPtr | GNSS constellation used in solution. |
le_result_t le_gnss_GetDate | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | yearPtr, | ||
uint16_t * | monthPtr, | ||
uint16_t * | dayPtr | ||
) |
Get the position sample's date.
[in] | positionSampleRef | Position sample's reference. |
[out] | yearPtr | UTC Year A.D. [e.g. 2014]. |
[out] | monthPtr | UTC Month into the year [range 1...12]. |
[out] | dayPtr | UTC Days into the month [range 1...31]. |
le_result_t le_gnss_GetDirection | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | directionPtr, | ||
int32_t * | directionAccuracyPtr | ||
) |
Get the position sample's direction. Direction of movement is the direction that the vehicle/person is actually moving.
[in] | positionSampleRef | Position sample's reference. |
[out] | directionPtr | Direction in degrees [resolution 1e-1]. (where 0 is True North) |
[out] | directionAccuracyPtr | Direction's accuracy estimate in degrees [resolution 1e-1]. |
le_result_t le_gnss_GetDop | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | hdopPtr, | ||
uint16_t * | vdopPtr, | ||
uint16_t * | pdopPtr | ||
) |
Get the DOP parameters (Dilution Of Precision) for the fixed position.
[in] | positionSampleRef | Position sample's reference. |
[out] | hdopPtr | Horizontal Dilution of Precision [resolution 1e-3]. |
[out] | vdopPtr | Vertical Dilution of Precision [resolution 1e-3]. |
[out] | pdopPtr | Position Dilution of Precision [resolution 1e-3]. |
le_result_t le_gnss_GetExtendedEphemerisValidity | ( | le_clk_Time_t * | startTimePtr, |
le_clk_Time_t * | stopTimePtr | ||
) |
This function must be called to get the validity of the last injected Extended Ephemeris.
[out] | startTimePtr | Start time |
[out] | stopTimePtr | Stop time |
le_result_t le_gnss_GetHorizontalSpeed | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | hspeedPtr, | ||
uint32_t * | hspeedAccuracyPtr | ||
) |
Get the position sample's horizontal speed.
[in] | positionSampleRef | Position sample's reference. |
[out] | hspeedPtr | Horizontal speed in meters/second [resolution 1e-2]. |
[out] | hspeedAccuracyPtr | Horizontal speed's accuracy estimate in meters/second [resolution 1e-1]. |
le_result_t le_gnss_GetLocation | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | latitudePtr, | ||
int32_t * | longitudePtr, | ||
int32_t * | hAccuracyPtr | ||
) |
Get the location's data (Latitude, Longitude, Horizontal accuracy).
[in] | positionSampleRef | Position sample's reference. |
[out] | latitudePtr | WGS84 Latitude in degrees, positive North [resolution 1e-6]. |
[out] | longitudePtr | WGS84 Longitude in degrees, positive East [resolution 1e-6]. |
[out] | hAccuracyPtr | Horizontal position's accuracy in metres [resolution 1e-2]. |
le_result_t le_gnss_GetPositionState | ( | le_gnss_SampleRef_t | positionSampleRef, |
le_gnss_FixState_t * | statePtr | ||
) |
This function gets the position sample's fix state
[in] | positionSampleRef | Position sample's reference. |
[out] | statePtr | Position fix state. |
le_result_t le_gnss_GetSuplAssistedMode | ( | le_gnss_AssistedMode_t * | assistedModePtr | ) |
This function gets the SUPL Assisted-GNSS mode.
[out] | assistedModePtr | Assisted-GNSS mode. |
le_result_t le_gnss_GetTime | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | hoursPtr, | ||
uint16_t * | minutesPtr, | ||
uint16_t * | secondsPtr, | ||
uint16_t * | millisecondsPtr | ||
) |
Get the position sample's time.
[in] | positionSampleRef | Position sample's reference. |
[out] | hoursPtr | UTC Hours into the day [range 0..23]. |
[out] | minutesPtr | UTC Minutes into the hour [range 0..59]. |
[out] | secondsPtr | UTC Seconds into the minute [range 0..59]. |
[out] | millisecondsPtr | UTC Milliseconds into the second [range 0..999]. |
le_result_t le_gnss_GetTtff | ( | uint32_t * | ttffPtr | ) |
Get the TTFF in milliseconds
[out] | ttffPtr | TTFF in milliseconds |
le_result_t le_gnss_GetVerticalSpeed | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | vspeedPtr, | ||
int32_t * | vspeedAccuracyPtr | ||
) |
Get the position sample's vertical speed.
[in] | positionSampleRef | Position sample's reference. |
[out] | vspeedPtr | Vertical speed in meters/second [resolution 1e-2]. |
[out] | vspeedAccuracyPtr | Vertical speed's accuracy estimate in meters/second [resolution 1e-1]. |
le_result_t le_gnss_InjectSuplCertificate | ( | uint8_t | suplCertificateId, |
uint16_t | suplCertificateLen, | ||
const char * | suplCertificate | ||
) |
This function injects the SUPL certificate to be used in A-GNSS sessions.
[in] | suplCertificateId | Certificate ID of the SUPL certificate. Certificate ID range is 0 to 9 |
[in] | suplCertificateLen | SUPL certificate size in Bytes. |
[in] | suplCertificate | SUPL certificate contents. |
le_result_t le_gnss_LoadExtendedEphemerisFile | ( | int | fd | ) |
This function must be called to load an 'Extended Ephemeris' file into the GNSS device.
[in] | fd | Extended ephemeris file descriptor |
void le_gnss_ReleaseSampleRef | ( | le_gnss_SampleRef_t | positionSampleRef | ) |
This function must be called to release the position sample.
[in] | positionSampleRef | Position sample's reference. |
void le_gnss_RemovePositionHandler | ( | le_gnss_PositionHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_gnss_Position'
[in] | addHandlerRef |
le_result_t le_gnss_SetAcquisitionRate | ( | uint32_t | rate | ) |
This function sets the GNSS device acquisition rate.
[in] | rate | Acquisition rate in milliseconds. |
le_result_t le_gnss_SetConstellation | ( | le_gnss_ConstellationBitMask_t | constellationMask | ) |
Set the GNSS constellation bit mask
[in] | constellationMask | GNSS constellation used in solution. |
le_result_t le_gnss_SetSuplAssistedMode | ( | le_gnss_AssistedMode_t | assistedMode | ) |
This function sets the SUPL Assisted-GNSS mode.
[in] | assistedMode | Assisted-GNSS mode. |
le_result_t le_gnss_SetSuplServerUrl | ( | const char * | suplServerUrl | ) |
This function sets the SUPL server URL. That server URL is a NULL-terminated string with a maximum string length (including NULL terminator) equal to 256. Optionally the port number is specified after a colon.
[in] | suplServerUrl | SUPL server URL. |
le_result_t le_gnss_Start | ( | void | ) |
This function starts the GNSS device.
le_result_t le_gnss_Stop | ( | void | ) |
This function stops the GNSS device.