From bd38dc23faffe8cf99bbd0bc726c2466e7f15a9d Mon Sep 17 00:00:00 2001 From: Helmut Schmidt Date: Tue, 1 Dec 2015 14:53:06 +0100 Subject: GT-3206 GNSS API: add GNSS antenna status | GT-XXXX additional proposal to add leap seconds to GNSSTime --- gnss-service/api/gnss-status.h | 17 ++++++++++++++++- gnss-service/api/gnss.h | 13 +++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gnss-service/api/gnss-status.h b/gnss-service/api/gnss-status.h index 9815005..f2cc6dd 100644 --- a/gnss-service/api/gnss-status.h +++ b/gnss-service/api/gnss-status.h @@ -34,12 +34,26 @@ typedef enum { GNSS_STATUS_OUTOFSERVICE = 5 /**< GNSS is temporarily not available, due to some known external condition, e.g. firmware update or switch off for antenna supervision. */ } EGNSSStatus; +/** + * Enumeration to describe the status of the GNSS antenna + */ +typedef enum { + GNSS_ANT_STATUS_NORMAL = 0, /**< GNSS antenna is working in normal operation. */ + GNSS_ANT_STATUS_OVERCURRENT = 1, /**< GNSS antenna is working but the antenna current is higher than expected. */ + GNSS_ANT_STATUS_OPEN = 2, /**< GNSS antenna is not working because not connected (antenna current too low). */ + GNSS_ANT_STATUS_SHORT_GND = 3, /**< GNSS antenna is not working due to short-curcuit to ground. */ + GNSS_ANT_STATUS_SHORT_BATT = 4, /**< GNSS antenna is not working due to short-curcuit to battery. */ + GNSS_ANT_STATUS_OUTOFSERVICE = 5 /**< GNSS antenna is temporarily not available, due to some known external condition. */ +} EGNSSAntennaStatus; + + /** * TGNSSStatus::validityBits provides information about the currently valid signals of the TGNSSStatus struct. * It is a or'ed bitmask of the EGNSSStatusValidityBits values. */ typedef enum { - GNSS_STATUS_STATUS_VALID = 0x00000001 /**< Validity bit for field TGNSSStatus::status. */ + GNSS_STATUS_STATUS_VALID = 0x00000001, /**< Validity bit for field TGNSSStatus::status. */ + GNSS_STATUS_ANT_STATUS_VALID = 0x00000002 /**< Validity bit for field TGNSSStatus::antStatus. */ } EGNSSStatusValidityBits; /** @@ -49,6 +63,7 @@ typedef struct { uint64_t timestamp; /**< Timestamp of the GNSS status transition [ms]. All sensor/GNSS timestamps must be based on the same time source. */ EGNSSStatus status; /**< Status of the GNSS receiver */ + EGNSSAntennaStatus antStatus; /**< Status of the GNSS antenna */ uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value. [bitwise or'ed @ref EGNSSStatusValidityBits values]. Must be checked before usage. */ diff --git a/gnss-service/api/gnss.h b/gnss-service/api/gnss.h index 1e5af0a..ea789fe 100644 --- a/gnss-service/api/gnss.h +++ b/gnss-service/api/gnss.h @@ -90,6 +90,14 @@ typedef enum { GNSS_FIX_TYPE_SIMULATOR_MODE = 0x20000000, /**< Position is simulated */ } EGNSSFixType; +/** + * Description of the fix status of the GNSS reveiver. + */ +typedef enum { + GNSS_TIME_TYPE_UTC, /**< GNSS time is provided according UTC time scale (with leap seconds) */ + GNSS_TIME_TYPE_GPS /**< GNSS time is provided according GPS time scale (no leap seconds since 06-Jan-1980) */ +} EGNSSTimeType; + /** * TGNSSTime::validityBits provides information about the currently valid parts of UTC date/time. * It is a or'ed bitmask of the EGNSSUTCValidityBits values. @@ -98,6 +106,8 @@ typedef enum { typedef enum { GNSS_TIME_TIME_VALID = 0x00000001, /**< Validity bit for field TGNSSTime fields hour, minute, second, ms. */ GNSS_TIME_DATE_VALID = 0x00000002, /**< Validity bit for field TGNSSTime fields year, month, day. */ + GNSS_TIME_TYPE_VALID = 0x00000004, /**< Validity bit for field TGNSSTime field type. */ + GNSS_TIME_LEAPSEC_VALID = 0x00000008, /**< Validity bit for field TGNSSTime field leapSeconds. */ } EGNSSTimeValidityBits; /** @@ -115,6 +125,9 @@ typedef struct { uint8_t second; /**< Second fraction of the UTC time. Unit: [seconds] Number between 0 and 59. In case of a leap second this value is 60. */ uint16_t ms; /**< Millisecond fraction of the UTC time. Unit: [milliseconds] Number between 0 and 999 */ + EGNSSTimeType type; /**< Time scale used: UTC or GPS.*/ + int8_t leapSeconds; /**< Number of leap seconds, i.e. difference between GPS time and UTC. Unit: [seconds]. + Note: value before 01-July-2015: 16; from 01-July-2015: 17; further changes possible. */ uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value. [bitwise or'ed @ref EGNSSTimeValidityBits values]. Must be checked before usage. */ -- cgit v1.2.1