summaryrefslogtreecommitdiff
path: root/location/LocationAPI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'location/LocationAPI.cpp')
-rw-r--r--location/LocationAPI.cpp76
1 files changed, 76 insertions, 0 deletions
diff --git a/location/LocationAPI.cpp b/location/LocationAPI.cpp
index 4348c27..7c125b8 100644
--- a/location/LocationAPI.cpp
+++ b/location/LocationAPI.cpp
@@ -723,3 +723,79 @@ LocationControlAPI::gnssDeleteAidingData(GnssAidingData& data)
pthread_mutex_unlock(&gDataMutex);
return id;
}
+
+uint32_t LocationControlAPI::resetConstellationConfig() {
+ uint32_t id = 0;
+ pthread_mutex_lock(&gDataMutex);
+
+ if (gData.gnssInterface != NULL) {
+ id = gData.gnssInterface->gnssResetSvConfig();
+ } else {
+ LOC_LOGe("No gnss interface available for Location Control API");
+ }
+
+ pthread_mutex_unlock(&gDataMutex);
+ return id;
+}
+
+uint32_t LocationControlAPI::configConstellations(
+ const GnssSvTypeConfig& svTypeConfig,
+ const GnssSvIdConfig& svIdConfig) {
+ uint32_t id = 0;
+ pthread_mutex_lock(&gDataMutex);
+
+ if (gData.gnssInterface != NULL) {
+ id = gData.gnssInterface->gnssUpdateSvConfig(
+ svTypeConfig, svIdConfig);
+ } else {
+ LOC_LOGe("No gnss interface available for Location Control API");
+ }
+
+ pthread_mutex_unlock(&gDataMutex);
+ return id;
+}
+
+uint32_t LocationControlAPI::configConstrainedTimeUncertainty(
+ bool enable, float tuncThreshold, uint32_t energyBudget) {
+ uint32_t id = 0;
+ pthread_mutex_lock(&gDataMutex);
+
+ if (gData.gnssInterface != NULL) {
+ id = gData.gnssInterface->setConstrainedTunc(enable,
+ tuncThreshold,
+ energyBudget);
+ } else {
+ LOC_LOGe("No gnss interface available for Location Control API");
+ }
+
+ pthread_mutex_unlock(&gDataMutex);
+ return id;
+}
+
+uint32_t LocationControlAPI::configPositionAssistedClockEstimator(bool enable) {
+ uint32_t id = 0;
+ pthread_mutex_lock(&gDataMutex);
+
+ if (gData.gnssInterface != NULL) {
+ id = gData.gnssInterface->setPositionAssistedClockEstimator(enable);
+ } else {
+ LOC_LOGe("No gnss interface available for Location Control API");
+ }
+
+ pthread_mutex_unlock(&gDataMutex);
+ return id;
+}
+
+uint32_t LocationControlAPI::configLeverArm(const LeverArmConfigInfo& configInfo) {
+ uint32_t id = 0;
+ pthread_mutex_lock(&gDataMutex);
+
+ if (gData.gnssInterface != NULL) {
+ id = gData.gnssInterface->configLeverArm(configInfo);
+ } else {
+ LOC_LOGe("No gnss interface available for Location Control API");
+ }
+
+ pthread_mutex_unlock(&gDataMutex);
+ return id;
+}