Myriota UltraLite SDK 2.4.0
Loading...
Searching...
No Matches
Time and location

GNSS positioning and time synchronisation. More...

Functions

MYRIOTA_USER_API int GNSSFix (void)
 Perform a time and location fix from GNSS.
 
MYRIOTA_USER_API bool HasValidGNSSFix (void)
 Check if the system has a valid GNSS fix.
 
MYRIOTA_USER_API void LocationGet (int32_t *Latitude, int32_t *Longitude, time_t *TimeStamp)
 Get the last recorded location and timestamp.
 
MYRIOTA_USER_API void LocationSet (int32_t Latitude, int32_t Longitude)
 Set the location.
 
MYRIOTA_USER_API time_t TimeGet (void)
 Get the current epoch time.
 
MYRIOTA_USER_API void TimeSet (time_t Time)
 Set the current epoch time.
 

Detailed Description

GNSS positioning and time synchronisation.

Function Documentation

◆ GNSSFix()

MYRIOTA_USER_API int GNSSFix ( void  )

Perform a time and location fix from GNSS.

Updates real-time clock and latitude and longitude values.

Returns
0 if GNSS fix was correctly obtained and -1 otherwise.

◆ HasValidGNSSFix()

MYRIOTA_USER_API bool HasValidGNSSFix ( void  )

Check if the system has a valid GNSS fix.

Returns
true if a valid GNSS fix is available, false otherwise.

◆ LocationGet()

MYRIOTA_USER_API void LocationGet ( int32_t *  Latitude,
int32_t *  Longitude,
time_t *  TimeStamp 
)

Get the last recorded location and timestamp.

Parameters
Latitude[out]Pointer to store the latitude in degrees multiplied by 1e7.
Longitude[out]Pointer to store the longitude in degrees multiplied by 1e7.
TimeStamp[out]Pointer to store the timestamp of the last fix.

◆ LocationSet()

MYRIOTA_USER_API void LocationSet ( int32_t  Latitude,
int32_t  Longitude 
)

Set the location.

Location set may be overridden by GNSS fix if GNSS location fix is enabled.

Parameters
LatitudeLatitude in degrees multiplied by 1e7.
LongitudeLongitude in degrees multiplied by 1e7.

◆ TimeGet()

MYRIOTA_USER_API time_t TimeGet ( void  )

Get the current epoch time.

Returns
The current epoch time.

◆ TimeSet()

MYRIOTA_USER_API void TimeSet ( time_t  Time)

Set the current epoch time.

Parameters
TimeThe epoch time to set.