summaryrefslogtreecommitdiff
path: root/gnss-service
diff options
context:
space:
mode:
authorHelmut Schmidt <Helmut.3.Schmidt@continental-corporation.com>2015-10-28 14:36:18 +0100
committerHelmut Schmidt <Helmut.3.Schmidt@continental-corporation.com>2015-10-28 14:36:18 +0100
commit264e3d07e6b318ae1f029cd1e094451874262861 (patch)
tree19a649746503de8c3a41be8b336f46f554b25f35 /gnss-service
parentc906c3b2ac8cb5f30a252e7b593fe542684330e8 (diff)
downloadpositioning-264e3d07e6b318ae1f029cd1e094451874262861.tar.gz
GT-3151 / GT-3152 Extend EnhancedPositioning Configuration API
Diffstat (limited to 'gnss-service')
-rw-r--r--gnss-service/api/gnss-init.h2
-rw-r--r--gnss-service/api/gnss.h25
-rw-r--r--gnss-service/src/gnss-use-gpsd.c5
-rw-r--r--gnss-service/src/gnss-use-nmea.cpp10
-rw-r--r--gnss-service/src/gnss-use-replayer.c5
-rw-r--r--gnss-service/test/gnss-service-client.c4
6 files changed, 39 insertions, 12 deletions
diff --git a/gnss-service/api/gnss-init.h b/gnss-service/api/gnss-init.h
index ee1765c..4e9e4c1 100644
--- a/gnss-service/api/gnss-init.h
+++ b/gnss-service/api/gnss-init.h
@@ -26,7 +26,7 @@ extern "C" {
// API Version
-#define GENIVI_GNSS_API_MAJOR 3
+#define GENIVI_GNSS_API_MAJOR 4
#define GENIVI_GNSS_API_MINOR 0
#define GENIVI_GNSS_API_MICRO 0
diff --git a/gnss-service/api/gnss.h b/gnss-service/api/gnss.h
index 8ba55ee..711782d 100644
--- a/gnss-service/api/gnss.h
+++ b/gnss-service/api/gnss.h
@@ -136,7 +136,7 @@ typedef enum {
GNSS_SYSTEM_GLONASS_L2 = 0x00000040, /**< GLONASS (L2 signal) */
GNSS_SYSTEM_BEIDOU_B2 = 0x00000080, /**< BeiDou aka COMPASS (B2 signal) */
/* Numbers >= 0x00010000 are used to identify SBAS (satellite based augmentation system) */
- GNSS_SYSTEM_SBAS_WAAS = 0x00010000, /**< WASS (North America) */
+ GNSS_SYSTEM_SBAS_WAAS = 0x00010000, /**< WAAS (North America) */
GNSS_SYSTEM_SBAS_EGNOS = 0x00020000, /**< EGNOS (Europe) */
GNSS_SYSTEM_SBAS_MSAS = 0x00040000, /**< MSAS (Japan) */
GNSS_SYSTEM_SBAS_QZSS_SAIF = 0x00080000, /**< QZSS-SAIF (Japan) */
@@ -228,8 +228,8 @@ typedef enum {
GNSS_POSITION_STAT_VALID = 0x00040000, /**< Validity bit for field TGNSSPosition::fixStatus. */
GNSS_POSITION_TYPE_VALID = 0x00080000, /**< Validity bit for field TGNSSPosition::fixTypeBits. */
//gnss system information
- GNSS_POSITION_ASYS_VALID = 0x00100000, /**< Validity bit for field TGNSSPosition::activated_systems. */
- GNSS_POSITION_USYS_VALID = 0x00200000, /**< Validity bit for field TGNSSPosition::used_systems. */
+ GNSS_POSITION_ASYS_VALID = 0x00100000, /**< Validity bit for field TGNSSPosition::activatedSystems. */
+ GNSS_POSITION_USYS_VALID = 0x00200000, /**< Validity bit for field TGNSSPosition::usedSystems. */
} EGNSSPositionValidityBits;
/**
@@ -267,9 +267,9 @@ typedef struct {
uint32_t fixTypeBits; /**< Bit mask indicating the sources actually used for the GNSS calculation.
[bitwise or'ed @ref EGNSSFixType values]. */
//gnss system information
- uint32_t activated_systems; /**< Bit mask indicating the satellite systems that are activated for use
+ uint32_t activatedSystems; /**< Bit mask indicating the satellite systems that are activated for use
[bitwise or'ed @ref EGNSSSystem values].*/
- uint32_t used_systems; /**< Bit mask indicating the satellite systems that are actually used for the position fix
+ uint32_t usedSystems; /**< Bit mask indicating the satellite systems that are actually used for the position fix
[bitwise or'ed @ref EGNSSSystem values].*/
//validity bits
uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value.
@@ -429,14 +429,25 @@ bool gnssGetPrecisionTimingOffset(int32_t *delta);
* the corresponding fields @ref activated_systems and @ref used_systems
* in @ref TGNSSPosition updates have to be monitored
*
- * @param activate_systems Bit mask indicating the satellite systems which shall be activated for use
+ * @param activateSystems Bit mask indicating the satellite systems which shall be activated for use
* [bitwise or'ed @ref EGNSSSystem values].
*
* @return True if the configuration request has been accepted.
* @return False if the configuration request has not been accepted or is not supported at all.
*
*/
-bool gnssConfigGNSSSystems(uint32_t activate_systems);
+bool gnssConfigGNSSSystems(uint32_t activateSystems);
+
+/**
+ * Provide the satellite systems which are supported by the GNSS hardware.
+ *
+ * @param supportedSystems Bit mask indicating the satellite systems which are supported by the GNSS hardware
+ * [bitwise or'ed @ref EGNSSSystem values].
+ *
+ * @return True if the supported satellite systems are provided in supportedSystems.
+ *
+*/
+bool gnssGetSupportedGNSSSystems(uint32_t *supportedSystems);
#ifdef __cplusplus
}
diff --git a/gnss-service/src/gnss-use-gpsd.c b/gnss-service/src/gnss-use-gpsd.c
index dde6fe4..b0f5017 100644
--- a/gnss-service/src/gnss-use-gpsd.c
+++ b/gnss-service/src/gnss-use-gpsd.c
@@ -89,6 +89,11 @@ bool gnssConfigGNSSSystems(uint32_t activate_systems)
return false; //satellite system configuration request not supported by gpsd
}
+bool gnssGetSupportedGNSSSystems(uint32_t *supportedSystems)
+{
+ *supportedSystems = GNSS_SYSTEM_GPS;
+ return true;
+}
static EGNSSFixStatus convertToFixStatus(int fixMode)
{
diff --git a/gnss-service/src/gnss-use-nmea.cpp b/gnss-service/src/gnss-use-nmea.cpp
index 99ef16c..9c5d11e 100644
--- a/gnss-service/src/gnss-use-nmea.cpp
+++ b/gnss-service/src/gnss-use-nmea.cpp
@@ -166,9 +166,9 @@ bool extractPosition(const GPS_DATA& gps_data, uint64_t timestamp, TGNSSPosition
//hardcoded values for standard GPS receiver
gnss_pos.fixTypeBits = GNSS_FIX_TYPE_SINGLE_FREQUENCY;
gnss_pos.validityBits |= GNSS_POSITION_TYPE_VALID;
- gnss_pos.activated_systems = GNSS_SYSTEM_GPS;
+ gnss_pos.activatedSystems = GNSS_SYSTEM_GPS;
gnss_pos.validityBits |= GNSS_POSITION_ASYS_VALID;
- gnss_pos.used_systems = GNSS_SYSTEM_GPS;
+ gnss_pos.usedSystems = GNSS_SYSTEM_GPS;
gnss_pos.validityBits |= GNSS_POSITION_USYS_VALID;
return true;
@@ -419,4 +419,10 @@ void gnssGetVersion(int *major, int *minor, int *micro)
bool gnssConfigGNSSSystems(uint32_t activate_systems)
{
return false; //satellite system configuration request not supported by NMEA protocol
+}
+
+bool gnssGetSupportedGNSSSystems(uint32_t *supportedSystems)
+{
+ *supportedSystems = GNSS_SYSTEM_GPS;
+ return true;
} \ No newline at end of file
diff --git a/gnss-service/src/gnss-use-replayer.c b/gnss-service/src/gnss-use-replayer.c
index 7b099e6..336a55d 100644
--- a/gnss-service/src/gnss-use-replayer.c
+++ b/gnss-service/src/gnss-use-replayer.c
@@ -102,6 +102,11 @@ bool gnssConfigGNSSSystems(uint32_t activate_systems)
return false; //satellite system configuration request not supported for replay
}
+bool gnssGetSupportedGNSSSystems(uint32_t *supportedSystems)
+{
+ *supportedSystems = GNSS_SYSTEM_GPS;
+ return true;
+}
//backward compatible processing of GVGNSAC to the new TGNSSPosition
bool processGVGNSAC(char* data)
diff --git a/gnss-service/test/gnss-service-client.c b/gnss-service/test/gnss-service-client.c
index 253fb19..85d0472 100644
--- a/gnss-service/test/gnss-service-client.c
+++ b/gnss-service/test/gnss-service-client.c
@@ -90,8 +90,8 @@ static void cbPosition(const TGNSSPosition position[], uint16_t numElements)
position[i].sigmaHeading,
position[i].fixStatus,
position[i].fixTypeBits,
- position[i].activated_systems,
- position[i].used_systems);
+ position[i].activatedSystems,
+ position[i].usedSystems);
}
}