Skip to content

GNSS

Satellite Navigation (GNSS) API.

Sysprops

The GNSS driver does not have any sysprops defined.

Functions Overview

Name
CW_DRIVER_FUNCgnss_poll(int hdev, gnss_data_t * data)
Polls the GNSS device for current data.
CW_DRIVER_FUNCgnss_epo_update(int hdev, const char * http_host, const char * file_path, uint8_t load_days, uint8_t threshold_days)
Updates the EPO (Extended Prediction Orbit) data for the GNSS device.
CW_DRIVER_FUNCgnss_epo_enddate(int hdev)
Get the end date of the GNSS EPO data.

Function Details

function gnss_poll

cpp
CW_DRIVER_FUNC gnss_poll(
    int hdev,
    gnss_data_t * data
)

Polls the GNSS device for current data.

Parameters:

  • hdev The handle of the GNSS device.
  • data Pointer to a gnss_data_t structure where the received data will be stored.

Returns:

  • <0 the receiver does not have a fix, yet
  • 0 success

Return: An integer value indicating the success or failure of the function.

This function sends a poll command to the GNSS device specified by the handle. The received data is filled into the gnss_data_t structure.

function gnss_epo_update

cpp
CW_DRIVER_FUNC gnss_epo_update(
    int hdev,
    const char * http_host,
    const char * file_path,
    uint8_t load_days,
    uint8_t threshold_days
)

Updates the EPO (Extended Prediction Orbit) data for the GNSS device.

Parameters:

  • hdev The handle of the GNSS device.
  • http_host The host of the HTTP server to download the EPO data from.
  • file_path The file path on the HTTP server where the EPO data is located.
  • load_days The number of days of EPO data to load onto the device.
  • threshold_days The number of days after which the loaded EPO data is considered expired.

Return: A driver-specific error code. Negative values represent errors, while positive values represent successful execution.

Remark:

  • Extended Prediction Orbit (EPO): The EPO is essentially a set of predicted satellite orbits that extend the standard data provided by the navigation satellites. These orbits are extrapolated beyond the immediate future, providing information about where the satellites are expected to be at different times. GNSS receivers use this data to improve satellite acquisition times and position fix accuracy, especially in scenarios where the device has been powered off for a while or moved long distances since it last received satellite data.
  • EPO File: An EPO file is a specific file format that contains this predicted orbit data. It typically includes information such as satellite IDs, orbital parameters, and timestamps. These files are provided by GNSS service providers and are periodically updated to ensure the most accurate predictions. GNSS receivers download and store these files, updating them as necessary to maintain accurate predictions. Overall, the Extended Prediction Orbit and its associated file format play a crucial role in improving the performance of GNSS receivers by providing extended satellite orbit predictions, thereby enhancing position accuracy and acquisition times.

This function performs an EPO update by sending an HTTP request to the specified HTTP server. The EPO data is downloaded from the specified file path on the server and then loaded onto the GNSS device.

function gnss_epo_enddate

cpp
CW_DRIVER_FUNC gnss_epo_enddate(
    int hdev
)

Get the end date of the GNSS EPO data.

Parameters:

  • hdev The handle to the device.

Return: The end date of the GNSS EPO data as an unsigned integer.

This function retrieves the end date of the GNSS EPO (Extended Prediction Orbit) data for the specified device.