sm8450-common: gps: Update to LA.VENDOR.1.0.r1-21900-WAIPIO.0
Change-Id: Ib431364a902ecd9b068e672978f5e24ecbf42160
This commit is contained in:
parent
36c55874bb
commit
f518e7ef8f
29 changed files with 1500 additions and 168 deletions
|
@ -10,6 +10,29 @@ GNSS_CFLAGS = [
|
||||||
"-Wno-undefined-bool-conversion",
|
"-Wno-undefined-bool-conversion",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
soong_config_module_type {
|
||||||
|
name: "qtilocation_cc_defaults",
|
||||||
|
module_type: "cc_defaults",
|
||||||
|
config_namespace: "qtilocation",
|
||||||
|
bool_variables: [
|
||||||
|
"feature_nhz",
|
||||||
|
],
|
||||||
|
properties: [
|
||||||
|
"cflags",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
qtilocation_cc_defaults {
|
||||||
|
name: "qtilocation_common_defaults",
|
||||||
|
cflags: GNSS_CFLAGS,
|
||||||
|
soong_config_variables: {
|
||||||
|
feature_nhz: {
|
||||||
|
cflags: ["-DFEATURE_NHZ_ENABLED"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Activate the following for debug purposes only,
|
/* Activate the following for debug purposes only,
|
||||||
comment out for production */
|
comment out for production */
|
||||||
GNSS_SANITIZE_DIAG = {
|
GNSS_SANITIZE_DIAG = {
|
||||||
|
|
|
@ -28,6 +28,10 @@ ifneq (,$(filter $(GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST),$(TARGET_BOARD_PLAT
|
||||||
GNSS_HIDL_LEGACY_MEASURMENTS := true
|
GNSS_HIDL_LEGACY_MEASURMENTS := true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Enable NHz location feature. Default is false.
|
||||||
|
# Set this flag to true to enable the NHz location feature.
|
||||||
|
FEATURE_NHZ_ENABLED := false
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,41 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
||||||
|
|
||||||
|
@ -119,6 +154,12 @@ void MeasurementAPIClient::measurementClose() {
|
||||||
LOC_LOGD("%s]: ()", __FUNCTION__);
|
LOC_LOGD("%s]: ()", __FUNCTION__);
|
||||||
mTracking = false;
|
mTracking = false;
|
||||||
locAPIStopTracking();
|
locAPIStopTracking();
|
||||||
|
|
||||||
|
// Clear measurement callback
|
||||||
|
LocationCallbacks locationCallbacks;
|
||||||
|
memset(&locationCallbacks, 0, sizeof(LocationCallbacks));
|
||||||
|
locationCallbacks.size = sizeof(LocationCallbacks);
|
||||||
|
locAPISetCallbacks(locationCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
|
|
@ -27,6 +27,41 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
||||||
|
|
||||||
|
@ -142,6 +177,12 @@ void MeasurementAPIClient::measurementClose() {
|
||||||
LOC_LOGD("%s]: ()", __FUNCTION__);
|
LOC_LOGD("%s]: ()", __FUNCTION__);
|
||||||
mTracking = false;
|
mTracking = false;
|
||||||
locAPIStopTracking();
|
locAPIStopTracking();
|
||||||
|
|
||||||
|
// Clear measurement callback
|
||||||
|
LocationCallbacks locationCallbacks;
|
||||||
|
memset(&locationCallbacks, 0, sizeof(LocationCallbacks));
|
||||||
|
locationCallbacks.size = sizeof(LocationCallbacks);
|
||||||
|
locAPISetCallbacks(locationCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
|
|
@ -27,6 +27,41 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
||||||
|
|
||||||
|
@ -178,6 +213,12 @@ void MeasurementAPIClient::measurementClose() {
|
||||||
LOC_LOGD("%s]: ()", __FUNCTION__);
|
LOC_LOGD("%s]: ()", __FUNCTION__);
|
||||||
mTracking = false;
|
mTracking = false;
|
||||||
locAPIStopTracking();
|
locAPIStopTracking();
|
||||||
|
|
||||||
|
// Clear measurement callback
|
||||||
|
LocationCallbacks locationCallbacks;
|
||||||
|
memset(&locationCallbacks, 0, sizeof(LocationCallbacks));
|
||||||
|
locationCallbacks.size = sizeof(LocationCallbacks);
|
||||||
|
locAPISetCallbacks(locationCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
|
|
@ -27,6 +27,41 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
#define LOG_TAG "LocSvc_MeasurementAPIClient"
|
||||||
|
|
||||||
|
@ -205,6 +240,12 @@ void MeasurementAPIClient::measurementClose() {
|
||||||
LOC_LOGD("%s]: ()", __FUNCTION__);
|
LOC_LOGD("%s]: ()", __FUNCTION__);
|
||||||
mTracking = false;
|
mTracking = false;
|
||||||
locAPIStopTracking();
|
locAPIStopTracking();
|
||||||
|
|
||||||
|
// Clear measurement callback
|
||||||
|
LocationCallbacks locationCallbacks;
|
||||||
|
memset(&locationCallbacks, 0, sizeof(LocationCallbacks));
|
||||||
|
locationCallbacks.size = sizeof(LocationCallbacks);
|
||||||
|
locAPISetCallbacks(locationCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
|
|
@ -18,6 +18,41 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_TAG "GnssMeasurementInterfaceAidl"
|
#define LOG_TAG "GnssMeasurementInterfaceAidl"
|
||||||
|
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
|
@ -80,6 +115,12 @@ GnssMeasurementInterface::GnssMeasurementInterface() :
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
locAPIStopTracking();
|
locAPIStopTracking();
|
||||||
|
|
||||||
|
// Clear measurement callback
|
||||||
|
LocationCallbacks locationCallbacks;
|
||||||
|
memset(&locationCallbacks, 0, sizeof(LocationCallbacks));
|
||||||
|
locationCallbacks.size = sizeof(LocationCallbacks);
|
||||||
|
locAPISetCallbacks(locationCallbacks);
|
||||||
|
|
||||||
return ndk::ScopedAStatus::ok();
|
return ndk::ScopedAStatus::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_CtxBase"
|
#define LOG_TAG "LocSvc_CtxBase"
|
||||||
|
|
||||||
|
@ -95,7 +132,6 @@ const loc_param_s_type ContextBase::mGps_conf_table[] =
|
||||||
{"NMEA_TAG_BLOCK_GROUPING_ENABLED", &mGps_conf.NMEA_TAG_BLOCK_GROUPING_ENABLED, NULL, 'n'},
|
{"NMEA_TAG_BLOCK_GROUPING_ENABLED", &mGps_conf.NMEA_TAG_BLOCK_GROUPING_ENABLED, NULL, 'n'},
|
||||||
{"NI_SUPL_DENY_ON_NFW_LOCKED", &mGps_conf.NI_SUPL_DENY_ON_NFW_LOCKED, NULL, 'n'},
|
{"NI_SUPL_DENY_ON_NFW_LOCKED", &mGps_conf.NI_SUPL_DENY_ON_NFW_LOCKED, NULL, 'n'},
|
||||||
{"ENABLE_NMEA_PRINT", &mGps_conf.ENABLE_NMEA_PRINT, NULL, 'n'},
|
{"ENABLE_NMEA_PRINT", &mGps_conf.ENABLE_NMEA_PRINT, NULL, 'n'},
|
||||||
{"ROBUST_LOCATION_ENABLED", &mGps_conf.ROBUST_LOCATION_ENABLED, NULL, 'n'},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loc_param_s_type ContextBase::mSap_conf_table[] =
|
const loc_param_s_type ContextBase::mSap_conf_table[] =
|
||||||
|
@ -200,14 +236,6 @@ void ContextBase::readConfig()
|
||||||
/* By default NMEA Printing is disabled */
|
/* By default NMEA Printing is disabled */
|
||||||
mGps_conf.ENABLE_NMEA_PRINT = 0;
|
mGps_conf.ENABLE_NMEA_PRINT = 0;
|
||||||
|
|
||||||
#ifdef USE_GLIB
|
|
||||||
// For LE target, disable by default
|
|
||||||
mGps_conf.ROBUST_LOCATION_ENABLED = 0x0;
|
|
||||||
#else
|
|
||||||
// enable robust location and robust location on E911
|
|
||||||
mGps_conf.ROBUST_LOCATION_ENABLED = 0x11;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UTIL_READ_CONF(LOC_PATH_GPS_CONF, mGps_conf_table);
|
UTIL_READ_CONF(LOC_PATH_GPS_CONF, mGps_conf_table);
|
||||||
UTIL_READ_CONF(LOC_PATH_SAP_CONF, mSap_conf_table);
|
UTIL_READ_CONF(LOC_PATH_SAP_CONF, mSap_conf_table);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __LOC_CONTEXT_BASE__
|
#ifndef __LOC_CONTEXT_BASE__
|
||||||
#define __LOC_CONTEXT_BASE__
|
#define __LOC_CONTEXT_BASE__
|
||||||
|
|
||||||
|
@ -84,7 +121,6 @@ typedef struct loc_gps_cfg_s
|
||||||
uint32_t NI_SUPL_DENY_ON_NFW_LOCKED;
|
uint32_t NI_SUPL_DENY_ON_NFW_LOCKED;
|
||||||
uint32_t ENABLE_NMEA_PRINT;
|
uint32_t ENABLE_NMEA_PRINT;
|
||||||
uint32_t NMEA_TAG_BLOCK_GROUPING_ENABLED;
|
uint32_t NMEA_TAG_BLOCK_GROUPING_ENABLED;
|
||||||
uint32_t ROBUST_LOCATION_ENABLED;
|
|
||||||
} loc_gps_cfg_s_type;
|
} loc_gps_cfg_s_type;
|
||||||
|
|
||||||
/* NOTE: the implementation of the parser casts number
|
/* NOTE: the implementation of the parser casts number
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_LocAdapterBase"
|
#define LOG_TAG "LocSvc_LocAdapterBase"
|
||||||
|
|
||||||
|
@ -439,4 +476,7 @@ bool LocAdapterBase::
|
||||||
reportQwesCapabilities(const std::unordered_map<LocationQwesFeatureType, bool> &/*featureMap*/)
|
reportQwesCapabilities(const std::unordered_map<LocationQwesFeatureType, bool> &/*featureMap*/)
|
||||||
DEFAULT_IMPL(false)
|
DEFAULT_IMPL(false)
|
||||||
|
|
||||||
|
void LocAdapterBase::reportEngDebugDataInfoEvent(GnssEngineDebugDataInfo& gnssEngineDebugDataInfo)
|
||||||
|
DEFAULT_IMPL()
|
||||||
|
|
||||||
} // namespace loc_core
|
} // namespace loc_core
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef LOC_API_ADAPTER_BASE_H
|
#ifndef LOC_API_ADAPTER_BASE_H
|
||||||
#define LOC_API_ADAPTER_BASE_H
|
#define LOC_API_ADAPTER_BASE_H
|
||||||
|
|
||||||
|
@ -235,6 +272,7 @@ public:
|
||||||
void requestCapabilitiesCommand(LocationAPI* client);
|
void requestCapabilitiesCommand(LocationAPI* client);
|
||||||
|
|
||||||
virtual void reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo);
|
virtual void reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo);
|
||||||
|
virtual void reportEngDebugDataInfoEvent(GnssEngineDebugDataInfo& gnssEngineDebugDataInfo);
|
||||||
virtual bool reportQwesCapabilities(
|
virtual bool reportQwesCapabilities(
|
||||||
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap);
|
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap);
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,10 @@
|
||||||
|
|
||||||
namespace loc_core {
|
namespace loc_core {
|
||||||
|
|
||||||
|
#define MSEC_IN_ONE_WEEK 604800000LL
|
||||||
|
#define REAL_TIME_ESTIMATOR_TIME_UNC_THRESHOLD_MSEC 20.0f
|
||||||
|
#define UNKNOWN_GPS_WEEK_NUM 65535
|
||||||
|
|
||||||
#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call))
|
#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call))
|
||||||
#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call))
|
#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call))
|
||||||
|
|
||||||
|
@ -330,7 +334,7 @@ void LocApiBase::reportPosition(UlpLocation& location,
|
||||||
LOC_LOGD("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n "
|
LOC_LOGD("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n "
|
||||||
"altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n "
|
"altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n "
|
||||||
"timestamp: %" PRId64 "\n"
|
"timestamp: %" PRId64 "\n"
|
||||||
"Session status: %d\n Technology mask: %u\n "
|
"Session status: %d\n Technology mask: %u\n, time bias unc %f msec\n "
|
||||||
"SV used in fix (gps/glo/bds/gal/qzss) : \
|
"SV used in fix (gps/glo/bds/gal/qzss) : \
|
||||||
(0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 ")",
|
(0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 "/0x%" PRIx64 ")",
|
||||||
location.gpsLocation.flags, location.position_source,
|
location.gpsLocation.flags, location.position_source,
|
||||||
|
@ -338,6 +342,7 @@ void LocApiBase::reportPosition(UlpLocation& location,
|
||||||
location.gpsLocation.altitude, location.gpsLocation.speed,
|
location.gpsLocation.altitude, location.gpsLocation.speed,
|
||||||
location.gpsLocation.bearing, location.gpsLocation.accuracy,
|
location.gpsLocation.bearing, location.gpsLocation.accuracy,
|
||||||
location.gpsLocation.timestamp, status, loc_technology_mask,
|
location.gpsLocation.timestamp, status, loc_technology_mask,
|
||||||
|
locationExtended.gnssSystemTime.u.gpsSystemTime.systemClkTimeUncMs,
|
||||||
locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask,
|
locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask,
|
||||||
locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask,
|
locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask,
|
||||||
locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask,
|
locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask,
|
||||||
|
@ -616,6 +621,10 @@ void LocApiBase::reportLatencyInfo(GnssLatencyInfo& gnssLatencyInfo)
|
||||||
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportLatencyInfoEvent(gnssLatencyInfo));
|
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportLatencyInfoEvent(gnssLatencyInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocApiBase::reportEngDebugDataInfo(GnssEngineDebugDataInfo& gnssEngineDebugDataInfo) {
|
||||||
|
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportEngDebugDataInfoEvent(gnssEngineDebugDataInfo));
|
||||||
|
}
|
||||||
|
|
||||||
enum loc_api_adapter_err LocApiBase::
|
enum loc_api_adapter_err LocApiBase::
|
||||||
open(LOC_API_ADAPTER_EVENT_MASK_T /*mask*/)
|
open(LOC_API_ADAPTER_EVENT_MASK_T /*mask*/)
|
||||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||||
|
@ -624,12 +633,6 @@ enum loc_api_adapter_err LocApiBase::
|
||||||
close()
|
close()
|
||||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||||
|
|
||||||
void LocApiBase::startFix(const LocPosMode& /*posMode*/, LocApiResponse* /*adapterResponse*/)
|
|
||||||
DEFAULT_IMPL()
|
|
||||||
|
|
||||||
void LocApiBase::stopFix(LocApiResponse* /*adapterResponse*/)
|
|
||||||
DEFAULT_IMPL()
|
|
||||||
|
|
||||||
void LocApiBase::
|
void LocApiBase::
|
||||||
deleteAidingData(const GnssAidingData& /*data*/, LocApiResponse* /*adapterResponse*/)
|
deleteAidingData(const GnssAidingData& /*data*/, LocApiResponse* /*adapterResponse*/)
|
||||||
DEFAULT_IMPL()
|
DEFAULT_IMPL()
|
||||||
|
@ -1040,7 +1043,13 @@ void ElapsedRealtimeEstimator::saveGpsTimeAndQtimerPairInPvtReport(
|
||||||
|
|
||||||
// Use GPS timestamp and qtimer tick for 1Hz PVT report for association
|
// Use GPS timestamp and qtimer tick for 1Hz PVT report for association
|
||||||
if ((locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_GPS_TIME) &&
|
if ((locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_GPS_TIME) &&
|
||||||
|
// 65535 GPS week from modem means unknown
|
||||||
|
(locationExtended.gpsTime.gpsWeek != UNKNOWN_GPS_WEEK_NUM) &&
|
||||||
(locationExtended.gpsTime.gpsTimeOfWeekMs % 1000 == 0) &&
|
(locationExtended.gpsTime.gpsTimeOfWeekMs % 1000 == 0) &&
|
||||||
|
(locationExtended.gnssSystemTime.u.gpsSystemTime.validityMask &
|
||||||
|
GNSS_SYSTEM_CLK_TIME_BIAS_UNC_VALID) &&
|
||||||
|
(locationExtended.gnssSystemTime.u.gpsSystemTime.systemClkTimeUncMs <
|
||||||
|
REAL_TIME_ESTIMATOR_TIME_UNC_THRESHOLD_MSEC) &&
|
||||||
(locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK) &&
|
(locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK) &&
|
||||||
(locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK_UNC)) {
|
(locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK_UNC)) {
|
||||||
mTimePairPVTReport.gpsTime.gpsWeek = locationExtended.gpsTime.gpsWeek;
|
mTimePairPVTReport.gpsTime.gpsWeek = locationExtended.gpsTime.gpsWeek;
|
||||||
|
@ -1062,13 +1071,17 @@ void ElapsedRealtimeEstimator::saveGpsTimeAndQtimerPairInMeasReport(
|
||||||
// Use 1Hz measurement report timestamp and qtimer tick for association
|
// Use 1Hz measurement report timestamp and qtimer tick for association
|
||||||
if ((svMeasurementSet.isNhz == false) &&
|
if ((svMeasurementSet.isNhz == false) &&
|
||||||
(svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_VALID) &&
|
(svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_VALID) &&
|
||||||
(svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_MS_VALID)) {
|
// 65535 GPS week from modem means unknown
|
||||||
|
(svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemWeek != UNKNOWN_GPS_WEEK_NUM) &&
|
||||||
|
(svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_MS_VALID) &&
|
||||||
|
(svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_CLK_TIME_BIAS_UNC_VALID) &&
|
||||||
|
(svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs <
|
||||||
|
REAL_TIME_ESTIMATOR_TIME_UNC_THRESHOLD_MSEC)) {
|
||||||
|
|
||||||
LOC_LOGv("gps time %d %d, meas unc %f, ref cnt tick %" PRIi64 ","
|
LOC_LOGv("gps time %d %d, ref cnt tick %" PRIi64 ","
|
||||||
"system rtc ms %" PRIi64 ", systemClkTimeUncMs %f",
|
"system rtc ms %" PRIi64 ", systemClkTimeUncMs %f",
|
||||||
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemWeek,
|
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemWeek,
|
||||||
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemMsec,
|
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemMsec,
|
||||||
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs,
|
|
||||||
svMeasurementSet.svMeasSetHeader.refCountTicks,
|
svMeasurementSet.svMeasSetHeader.refCountTicks,
|
||||||
svMeasurementSet.svMeasSetHeader.gpsSystemTimeExt.systemRtcMs,
|
svMeasurementSet.svMeasSetHeader.gpsSystemTimeExt.systemRtcMs,
|
||||||
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs);
|
svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs);
|
||||||
|
@ -1079,16 +1092,12 @@ void ElapsedRealtimeEstimator::saveGpsTimeAndQtimerPairInMeasReport(
|
||||||
mTimePairMeasReport.qtimerTick = svMeasurementSet.svMeasSetHeader.refCountTicks;
|
mTimePairMeasReport.qtimerTick = svMeasurementSet.svMeasSetHeader.refCountTicks;
|
||||||
mTimePairMeasReport.timeUncMsec = svMeasurementSet.svMeasSetHeader.refCountTicksUnc;
|
mTimePairMeasReport.timeUncMsec = svMeasurementSet.svMeasSetHeader.refCountTicksUnc;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOC_LOGv("gps time (%d, %d), qtimer tick %" PRIi64 ", unc %f",
|
|
||||||
mTimePairMeasReport.gpsTime.gpsWeek, mTimePairMeasReport.gpsTime.gpsTimeOfWeekMs,
|
|
||||||
mTimePairMeasReport.qtimerTick, mTimePairMeasReport.timeUncMsec);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MSEC_IN_ONE_WEEK 604800000LL
|
|
||||||
bool ElapsedRealtimeEstimator::getElapsedRealtimeForGpsTime(
|
bool ElapsedRealtimeEstimator::getElapsedRealtimeForGpsTime(
|
||||||
const GPSTimeStruct& gpsTimeAtOrigin, int64_t &bootTimeNsAtOrigin, float & bootTimeUnc) {
|
const GpsLocationExtended& locationExtended,
|
||||||
|
int64_t &bootTimeNsAtOrigin, float & bootTimeUnc) {
|
||||||
struct timespec curBootTime = {};
|
struct timespec curBootTime = {};
|
||||||
int64_t curBootTimeNs = 0;
|
int64_t curBootTimeNs = 0;
|
||||||
int64_t curQTimerNSec = 0;
|
int64_t curQTimerNSec = 0;
|
||||||
|
@ -1107,6 +1116,23 @@ bool ElapsedRealtimeEstimator::getElapsedRealtimeForGpsTime(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (((locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_GPS_TIME) == 0) ||
|
||||||
|
// 65535 GPS week from modem means unknown
|
||||||
|
(locationExtended.gpsTime.gpsWeek == UNKNOWN_GPS_WEEK_NUM) ||
|
||||||
|
((locationExtended.gnssSystemTime.u.gpsSystemTime.validityMask &
|
||||||
|
GNSS_SYSTEM_CLK_TIME_BIAS_UNC_VALID) == 0) ||
|
||||||
|
((locationExtended.gnssSystemTime.u.gpsSystemTime.systemClkTimeUncMs >=
|
||||||
|
REAL_TIME_ESTIMATOR_TIME_UNC_THRESHOLD_MSEC))) {
|
||||||
|
LOC_LOGd("report has invalid gps time, or no time bias unc or large time bias unc, "
|
||||||
|
"gps week %d, gps system time mask 0x%x, clk bias unc %f",
|
||||||
|
locationExtended.gpsTime.gpsWeek,
|
||||||
|
locationExtended.gnssSystemTime.u.gpsSystemTime.validityMask,
|
||||||
|
locationExtended.gnssSystemTime.u.gpsSystemTime.systemClkTimeUncMs);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const GPSTimeStruct& gpsTimeAtOrigin = locationExtended.gpsTime;
|
||||||
int64_t originMsec = (int64_t)gpsTimeAtOrigin.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK +
|
int64_t originMsec = (int64_t)gpsTimeAtOrigin.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK +
|
||||||
(int64_t)gpsTimeAtOrigin.gpsTimeOfWeekMs;
|
(int64_t)gpsTimeAtOrigin.gpsTimeOfWeekMs;
|
||||||
int64_t timePairMsec = (int64_t)timePair.gpsTime.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK +
|
int64_t timePairMsec = (int64_t)timePair.gpsTime.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK +
|
||||||
|
@ -1131,7 +1157,11 @@ bool ElapsedRealtimeEstimator::getElapsedRealtimeForGpsTime(
|
||||||
timePair.qtimerTick * 100000 / 192,
|
timePair.qtimerTick * 100000 / 192,
|
||||||
curQTimerNSec, qtimerNsecAtOrigin, curBootTimeNs, bootTimeNsAtOrigin, bootTimeUnc);
|
curQTimerNSec, qtimerNsecAtOrigin, curBootTimeNs, bootTimeNsAtOrigin, bootTimeUnc);
|
||||||
|
|
||||||
|
if (bootTimeNsAtOrigin > 0) {
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,7 @@ public:
|
||||||
void sendNfwNotification(GnssNfwNotification& notification);
|
void sendNfwNotification(GnssNfwNotification& notification);
|
||||||
void reportGnssConfig(uint32_t sessionId, const GnssConfig& gnssConfig);
|
void reportGnssConfig(uint32_t sessionId, const GnssConfig& gnssConfig);
|
||||||
void reportLatencyInfo(GnssLatencyInfo& gnssLatencyInfo);
|
void reportLatencyInfo(GnssLatencyInfo& gnssLatencyInfo);
|
||||||
|
void reportEngDebugDataInfo(GnssEngineDebugDataInfo& gnssEngineDebugDataInfo);
|
||||||
void reportQwesCapabilities
|
void reportQwesCapabilities
|
||||||
(
|
(
|
||||||
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap
|
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap
|
||||||
|
@ -228,8 +229,6 @@ public:
|
||||||
// downward calls
|
// downward calls
|
||||||
virtual void* getSibling();
|
virtual void* getSibling();
|
||||||
virtual LocApiProxyBase* getLocApiProxy();
|
virtual LocApiProxyBase* getLocApiProxy();
|
||||||
virtual void startFix(const LocPosMode& fixCriteria, LocApiResponse* adapterResponse);
|
|
||||||
virtual void stopFix(LocApiResponse* adapterResponse);
|
|
||||||
virtual void deleteAidingData(const GnssAidingData& data, LocApiResponse* adapterResponse);
|
virtual void deleteAidingData(const GnssAidingData& data, LocApiResponse* adapterResponse);
|
||||||
virtual void injectPosition(double latitude, double longitude, float accuracy,
|
virtual void injectPosition(double latitude, double longitude, float accuracy,
|
||||||
bool onDemandCpi);
|
bool onDemandCpi);
|
||||||
|
@ -385,7 +384,7 @@ public:
|
||||||
inline int64_t getElapsedRealtimeUncNanos() { return 5000000;}
|
inline int64_t getElapsedRealtimeUncNanos() { return 5000000;}
|
||||||
void reset();
|
void reset();
|
||||||
static int64_t getElapsedRealtimeQtimer(int64_t qtimerTicksAtOrigin);
|
static int64_t getElapsedRealtimeQtimer(int64_t qtimerTicksAtOrigin);
|
||||||
bool getElapsedRealtimeForGpsTime(const GPSTimeStruct& gpsTimeAtOrigin,
|
bool getElapsedRealtimeForGpsTime(const GpsLocationExtended& locationExtended,
|
||||||
int64_t &elapsedTime, float & elpasedTimeUnc);
|
int64_t &elapsedTime, float & elpasedTimeUnc);
|
||||||
void saveGpsTimeAndQtimerPairInPvtReport(const GpsLocationExtended& locationExtended);
|
void saveGpsTimeAndQtimerPairInPvtReport(const GpsLocationExtended& locationExtended);
|
||||||
void saveGpsTimeAndQtimerPairInMeasReport(const GnssSvMeasurementSet& svMeasurementSet);
|
void saveGpsTimeAndQtimerPairInMeasReport(const GnssSvMeasurementSet& svMeasurementSet);
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#define LOG_TAG "LocSvc_SystemStatus"
|
#define LOG_TAG "LocSvc_SystemStatus"
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
@ -93,6 +130,7 @@ public:
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
SystemStatusPQWM1
|
SystemStatusPQWM1
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
class SystemStatusPQWM1
|
class SystemStatusPQWM1
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -114,10 +152,10 @@ public:
|
||||||
uint32_t mJammerBds; // x10
|
uint32_t mJammerBds; // x10
|
||||||
uint32_t mJammerGal; // x11
|
uint32_t mJammerGal; // x11
|
||||||
uint32_t mRecErrorRecovery; // x12
|
uint32_t mRecErrorRecovery; // x12
|
||||||
double mAgcGps; // x13
|
uint32_t mAgcGps; // x13
|
||||||
double mAgcGlo; // x14
|
uint32_t mAgcGlo; // x14
|
||||||
double mAgcBds; // x15
|
uint32_t mAgcBds; // x15
|
||||||
double mAgcGal; // x16
|
uint32_t mAgcGal; // x16
|
||||||
int32_t mLeapSeconds;// x17
|
int32_t mLeapSeconds;// x17
|
||||||
int32_t mLeapSecUnc; // x18
|
int32_t mLeapSecUnc; // x18
|
||||||
uint32_t mGloBpAmpI; // x19
|
uint32_t mGloBpAmpI; // x19
|
||||||
|
@ -127,8 +165,39 @@ public:
|
||||||
uint32_t mGalBpAmpI; // x1D
|
uint32_t mGalBpAmpI; // x1D
|
||||||
uint32_t mGalBpAmpQ; // x1E
|
uint32_t mGalBpAmpQ; // x1E
|
||||||
uint64_t mTimeUncNs; // x1F
|
uint64_t mTimeUncNs; // x1F
|
||||||
|
uint32_t mJammedSignalsMask;
|
||||||
|
std::vector<GnssJammerData> mJammerData;
|
||||||
|
SystemStatusPQWM1(const GnssEngineDebugDataInfo& info);
|
||||||
|
SystemStatusPQWM1() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWM1::SystemStatusPQWM1(const GnssEngineDebugDataInfo& info) {
|
||||||
|
mGpsWeek = info.gpsWeek;
|
||||||
|
mGpsTowMs = info.gpsTowMs;
|
||||||
|
mTimeValid = info.timeValid;
|
||||||
|
mTimeSource = info.sourceOfTime;
|
||||||
|
mTimeUnc = info.clkTimeUnc;
|
||||||
|
mClockFreqBias = info.clkFreqBias;
|
||||||
|
mClockFreqBiasUnc = info.clkFreqUnc;
|
||||||
|
mXoState = info.xoState;
|
||||||
|
mRecErrorRecovery = info.rcvrErrRecovery;
|
||||||
|
if (info.jammerData.size() > 0) {
|
||||||
|
mJammerGps = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA].jammerInd;
|
||||||
|
mJammerGlo = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1].jammerInd;
|
||||||
|
mJammerBds = info.jammerData[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I].jammerInd;
|
||||||
|
mJammerGal = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C].jammerInd;
|
||||||
|
mAgcGps = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA].agc;
|
||||||
|
mAgcGlo = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1].agc;
|
||||||
|
mAgcBds = info.jammerData[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I].agc;
|
||||||
|
mAgcGal = info.jammerData[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C].agc;
|
||||||
|
}
|
||||||
|
mLeapSeconds = info.leapSecondInfo.leapSec;
|
||||||
|
mLeapSecUnc = info.leapSecondInfo.leapSecUnc;
|
||||||
|
mTimeUncNs = info.clkTimeUnc * 1000000LL;
|
||||||
|
mJammedSignalsMask = info.jammedSignalsMask;
|
||||||
|
mJammerData = std::move(info.jammerData);
|
||||||
|
}
|
||||||
|
|
||||||
// parser
|
// parser
|
||||||
class SystemStatusPQWM1parser : public SystemStatusNmeaBase
|
class SystemStatusPQWM1parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
|
@ -232,10 +301,11 @@ public:
|
||||||
mM1.mJammerBds = atoi(mField[eJammerBds].c_str());
|
mM1.mJammerBds = atoi(mField[eJammerBds].c_str());
|
||||||
mM1.mJammerGal = atoi(mField[eJammerGal].c_str());
|
mM1.mJammerGal = atoi(mField[eJammerGal].c_str());
|
||||||
mM1.mRecErrorRecovery = atoi(mField[eRecErrorRecovery].c_str());
|
mM1.mRecErrorRecovery = atoi(mField[eRecErrorRecovery].c_str());
|
||||||
mM1.mAgcGps = atof(mField[eAgcGps].c_str());
|
// convert agc db scale to 0.01 db
|
||||||
mM1.mAgcGlo = atof(mField[eAgcGlo].c_str());
|
mM1.mAgcGps = (uint32_t)(atof(mField[eAgcGps].c_str()) * 100);
|
||||||
mM1.mAgcBds = atof(mField[eAgcBds].c_str());
|
mM1.mAgcGlo = (uint32_t)(atof(mField[eAgcGlo].c_str()) * 100);
|
||||||
mM1.mAgcGal = atof(mField[eAgcGal].c_str());
|
mM1.mAgcBds = (uint32_t)(atof(mField[eAgcBds].c_str()) * 100);
|
||||||
|
mM1.mAgcGal = (uint32_t)(atof(mField[eAgcGal].c_str()) * 100);
|
||||||
if (mField.size() > eLeapSecUnc) {
|
if (mField.size() > eLeapSecUnc) {
|
||||||
mM1.mLeapSeconds = atoi(mField[eLeapSeconds].c_str());
|
mM1.mLeapSeconds = atoi(mField[eLeapSeconds].c_str());
|
||||||
mM1.mLeapSecUnc = atoi(mField[eLeapSecUnc].c_str());
|
mM1.mLeapSecUnc = atoi(mField[eLeapSecUnc].c_str());
|
||||||
|
@ -269,8 +339,20 @@ public:
|
||||||
float mEpiHepe; // x8
|
float mEpiHepe; // x8
|
||||||
float mEpiAltUnc; // x9
|
float mEpiAltUnc; // x9
|
||||||
uint8_t mEpiSrc; // x10
|
uint8_t mEpiSrc; // x10
|
||||||
|
SystemStatusPQWP1() = default;
|
||||||
|
SystemStatusPQWP1(const GnssEngineDebugDataInfo& info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWP1::SystemStatusPQWP1(const GnssEngineDebugDataInfo& info) {
|
||||||
|
mEpiValidity = info.epiValidity;
|
||||||
|
mEpiLat = info.epiLat;
|
||||||
|
mEpiLon = info.epiLon;
|
||||||
|
mEpiAlt = info.epiAlt;
|
||||||
|
mEpiHepe = info.epiHepe;
|
||||||
|
mEpiAltUnc = info.epiAltUnc;
|
||||||
|
mEpiSrc = info.epiSrc;
|
||||||
|
}
|
||||||
|
|
||||||
class SystemStatusPQWP1parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP1parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -328,8 +410,19 @@ public:
|
||||||
float mBestAlt; // x6
|
float mBestAlt; // x6
|
||||||
float mBestHepe; // x7
|
float mBestHepe; // x7
|
||||||
float mBestAltUnc; // x8
|
float mBestAltUnc; // x8
|
||||||
|
SystemStatusPQWP2() = default;
|
||||||
|
SystemStatusPQWP2(const GnssEngineDebugDataInfo& info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWP2::SystemStatusPQWP2(const GnssEngineDebugDataInfo& info){
|
||||||
|
mBestLat = info.bestPosLat;
|
||||||
|
mBestLon = info.bestPosLon;
|
||||||
|
mBestAlt = info.bestPosAlt;
|
||||||
|
mBestHepe = info.bestPosHepe;
|
||||||
|
mBestAltUnc = info.bestPosAltUnc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class SystemStatusPQWP2parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP2parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -389,8 +482,26 @@ public:
|
||||||
uint64_t mGalXtraValid;
|
uint64_t mGalXtraValid;
|
||||||
uint8_t mQzssXtraValid;
|
uint8_t mQzssXtraValid;
|
||||||
uint32_t mNavicXtraValid;
|
uint32_t mNavicXtraValid;
|
||||||
|
SystemStatusPQWP3() = default;
|
||||||
|
SystemStatusPQWP3(const GnssEngineDebugDataInfo& info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWP3::SystemStatusPQWP3(const GnssEngineDebugDataInfo& info){
|
||||||
|
mXtraValidMask = info.xtraValidMask;
|
||||||
|
mGpsXtraAge = info.gpsXtraAge;
|
||||||
|
mGloXtraAge = info.gloXtraAge;
|
||||||
|
mBdsXtraAge = info.bdsXtraAge;
|
||||||
|
mGalXtraAge = info.galXtraAge;
|
||||||
|
mQzssXtraAge = info.qzssXtraAge;
|
||||||
|
mNavicXtraAge = info.navicXtraAge;
|
||||||
|
mGpsXtraValid = info.gpsXtraMask;
|
||||||
|
mGloXtraValid = info.gloXtraMask;
|
||||||
|
mBdsXtraValid = info.gloXtraMask;
|
||||||
|
mGalXtraValid = info.galXtraMask;
|
||||||
|
mQzssXtraValid = info.qzssXtraMask;
|
||||||
|
mNavicXtraValid = info.navicXtraMask;
|
||||||
|
}
|
||||||
|
|
||||||
class SystemStatusPQWP3parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP3parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -464,8 +575,18 @@ public:
|
||||||
uint64_t mBdsEpheValid;
|
uint64_t mBdsEpheValid;
|
||||||
uint64_t mGalEpheValid;
|
uint64_t mGalEpheValid;
|
||||||
uint8_t mQzssEpheValid;
|
uint8_t mQzssEpheValid;
|
||||||
|
SystemStatusPQWP4() = default;
|
||||||
|
SystemStatusPQWP4(const GnssEngineDebugDataInfo& info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWP4::SystemStatusPQWP4(const GnssEngineDebugDataInfo& info) {
|
||||||
|
mGpsEpheValid = info.gpsEphMask;
|
||||||
|
mGloEpheValid = info.gloEphMask;
|
||||||
|
mBdsEpheValid = info.bdsEphMask;
|
||||||
|
mGalEpheValid = info.galEphMask;
|
||||||
|
mQzssEpheValid = info.qzssEphMask;
|
||||||
|
}
|
||||||
|
|
||||||
class SystemStatusPQWP4parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP4parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -530,8 +651,32 @@ public:
|
||||||
uint64_t mGalBadMask;
|
uint64_t mGalBadMask;
|
||||||
uint8_t mQzssBadMask;
|
uint8_t mQzssBadMask;
|
||||||
uint32_t mNavicBadMask;
|
uint32_t mNavicBadMask;
|
||||||
|
SystemStatusPQWP5() = default;
|
||||||
|
SystemStatusPQWP5(const GnssEngineDebugDataInfo& info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SystemStatusPQWP5::SystemStatusPQWP5(const GnssEngineDebugDataInfo& info){
|
||||||
|
mGpsUnknownMask = info.gpsHealthUnknownMask;
|
||||||
|
mGloUnknownMask = info.gloHealthUnknownMask;
|
||||||
|
mBdsUnknownMask = info.bdsHealthUnknownMask;
|
||||||
|
mGalUnknownMask = info.galHealthUnknownMask;
|
||||||
|
mQzssUnknownMask = info.qzssHealthUnknownMask;
|
||||||
|
mNavicUnknownMask = info.navicHealthUnknownMask;
|
||||||
|
mGpsGoodMask = info.gpsHealthGoodMask;
|
||||||
|
mGloGoodMask = info.gloHealthGoodMask;
|
||||||
|
mBdsGoodMask = info.bdsHealthGoodMask;
|
||||||
|
mGalGoodMask = info.galHealthGoodMask;
|
||||||
|
mQzssGoodMask = info.qzssHealthGoodMask;
|
||||||
|
mNavicGoodMask = info.navicHealthGoodMask;
|
||||||
|
mGpsBadMask = info.gpsHealthBadMask;
|
||||||
|
mGloBadMask = info.gloHealthBadMask;
|
||||||
|
mBdsBadMask = info.bdsHealthBadMask;
|
||||||
|
mGalBadMask = info.galHealthBadMask;
|
||||||
|
mQzssBadMask = info.qzssHealthBadMask;
|
||||||
|
mNavicBadMask = info.navicHealthBadMask;
|
||||||
|
}
|
||||||
|
|
||||||
class SystemStatusPQWP5parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP5parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -614,6 +759,10 @@ class SystemStatusPQWP6
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
uint32_t mFixInfoMask;
|
uint32_t mFixInfoMask;
|
||||||
|
SystemStatusPQWP6() = default;
|
||||||
|
inline SystemStatusPQWP6(const GnssEngineDebugDataInfo& info) {
|
||||||
|
mFixInfoMask = info.fixInfoMask;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP6parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP6parser : public SystemStatusNmeaBase
|
||||||
|
@ -651,8 +800,47 @@ class SystemStatusPQWP7
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SystemStatusNav mNav[SV_ALL_NUM];
|
SystemStatusNav mNav[SV_ALL_NUM];
|
||||||
|
SystemStatusPQWP7() = default;
|
||||||
|
SystemStatusPQWP7(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemStatusPQWP7::SystemStatusPQWP7(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo) {
|
||||||
|
memset(mNav, 0, SV_ALL_NUM_MIN * sizeof(SystemStatusNav));
|
||||||
|
for (int i = 0; i < GNSS_MAX_SV_INFO_LIST_SIZE; i++) {
|
||||||
|
GnssNavDataInfo navInfo = gnssEngineDebugDataInfo.navData[i];
|
||||||
|
int offset = 0;
|
||||||
|
if (0 == navInfo.gnssSvId) continue;
|
||||||
|
// GPS
|
||||||
|
if (navInfo.gnssSvId >= GPS_MIN && navInfo.gnssSvId < (GPS_MIN + GPS_NUM)) {
|
||||||
|
offset = navInfo.gnssSvId - GPS_MIN;
|
||||||
|
}
|
||||||
|
// GLO
|
||||||
|
if (navInfo.gnssSvId >= GLO_MIN && navInfo.gnssSvId < (GLO_MIN + GLO_NUM)) {
|
||||||
|
offset = GPS_NUM + navInfo.gnssSvId - GLO_MIN;
|
||||||
|
}
|
||||||
|
// BDS
|
||||||
|
if (navInfo.gnssSvId >= BDS_MIN && navInfo.gnssSvId < (BDS_MIN + BDS_NUM)) {
|
||||||
|
offset = GPS_NUM + GLO_NUM + navInfo.gnssSvId - BDS_MIN;
|
||||||
|
}
|
||||||
|
// GAL
|
||||||
|
if (navInfo.gnssSvId >= GAL_MIN && navInfo.gnssSvId < (GAL_MIN + GAL_NUM)) {
|
||||||
|
offset = GPS_NUM + GLO_NUM + BDS_NUM + navInfo.gnssSvId - GAL_MIN;
|
||||||
|
}
|
||||||
|
// QZSS
|
||||||
|
if (navInfo.gnssSvId >= QZSS_MIN && navInfo.gnssSvId < (QZSS_MIN + QZSS_NUM)) {
|
||||||
|
offset = GPS_NUM + GLO_NUM + BDS_NUM + GAL_NUM + navInfo.gnssSvId - QZSS_MIN;
|
||||||
|
}
|
||||||
|
//Navic
|
||||||
|
if (navInfo.gnssSvId >= NAVIC_MIN && navInfo.gnssSvId < (NAVIC_MIN + NAVIC_NUM)) {
|
||||||
|
offset = GPS_NUM + GLO_NUM + BDS_NUM + GAL_NUM + QZSS_NUM +
|
||||||
|
navInfo.gnssSvId - NAVIC_MIN;
|
||||||
|
}
|
||||||
|
mNav[offset].mType = GnssEphemerisType(navInfo.type);
|
||||||
|
mNav[offset].mSource = GnssEphemerisSource(navInfo.src);
|
||||||
|
mNav[offset].mAgeSec = navInfo.age;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class SystemStatusPQWP7parser : public SystemStatusNmeaBase
|
class SystemStatusPQWP7parser : public SystemStatusNmeaBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@ -698,6 +886,11 @@ class SystemStatusPQWS1
|
||||||
public:
|
public:
|
||||||
uint32_t mFixInfoMask;
|
uint32_t mFixInfoMask;
|
||||||
uint32_t mHepeLimit;
|
uint32_t mHepeLimit;
|
||||||
|
SystemStatusPQWS1() = default;
|
||||||
|
inline SystemStatusPQWS1(const GnssEngineDebugDataInfo& info) {
|
||||||
|
mFixInfoMask = info.fixStatusMask;
|
||||||
|
mHepeLimit = info.fixHepeLimit;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWS1parser : public SystemStatusNmeaBase
|
class SystemStatusPQWS1parser : public SystemStatusNmeaBase
|
||||||
|
@ -826,9 +1019,9 @@ SystemStatusRfAndParams::SystemStatusRfAndParams(const SystemStatusPQWM1& nmea)
|
||||||
mBdsBpAmpI(nmea.mBdsBpAmpI),
|
mBdsBpAmpI(nmea.mBdsBpAmpI),
|
||||||
mBdsBpAmpQ(nmea.mBdsBpAmpQ),
|
mBdsBpAmpQ(nmea.mBdsBpAmpQ),
|
||||||
mGalBpAmpI(nmea.mGalBpAmpI),
|
mGalBpAmpI(nmea.mGalBpAmpI),
|
||||||
mGalBpAmpQ(nmea.mGalBpAmpQ)
|
mGalBpAmpQ(nmea.mGalBpAmpQ),
|
||||||
{
|
mJammedSignalsMask(nmea.mJammedSignalsMask),
|
||||||
}
|
mJammerData(std::move(nmea.mJammerData)) {}
|
||||||
|
|
||||||
bool SystemStatusRfAndParams::equals(const SystemStatusItemBase& peer) {
|
bool SystemStatusRfAndParams::equals(const SystemStatusItemBase& peer) {
|
||||||
if ((mPgaGain != ((const SystemStatusRfAndParams&)peer).mPgaGain) ||
|
if ((mPgaGain != ((const SystemStatusRfAndParams&)peer).mPgaGain) ||
|
||||||
|
@ -849,7 +1042,8 @@ bool SystemStatusRfAndParams::equals(const SystemStatusItemBase& peer) {
|
||||||
(mBdsBpAmpI != ((const SystemStatusRfAndParams&)peer).mBdsBpAmpI) ||
|
(mBdsBpAmpI != ((const SystemStatusRfAndParams&)peer).mBdsBpAmpI) ||
|
||||||
(mBdsBpAmpQ != ((const SystemStatusRfAndParams&)peer).mBdsBpAmpQ) ||
|
(mBdsBpAmpQ != ((const SystemStatusRfAndParams&)peer).mBdsBpAmpQ) ||
|
||||||
(mGalBpAmpI != ((const SystemStatusRfAndParams&)peer).mGalBpAmpI) ||
|
(mGalBpAmpI != ((const SystemStatusRfAndParams&)peer).mGalBpAmpI) ||
|
||||||
(mGalBpAmpQ != ((const SystemStatusRfAndParams&)peer).mGalBpAmpQ)) {
|
(mGalBpAmpQ != ((const SystemStatusRfAndParams&)peer).mGalBpAmpQ) ||
|
||||||
|
(mJammedSignalsMask != ((const SystemStatusRfAndParams&)peer).mJammedSignalsMask)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -859,7 +1053,7 @@ void SystemStatusRfAndParams::dump()
|
||||||
{
|
{
|
||||||
LOC_LOGV("RfAndParams: u=%ld:%ld p=%d bi=%d bq=%d ai=%d aq=%d "
|
LOC_LOGV("RfAndParams: u=%ld:%ld p=%d bi=%d bq=%d ai=%d aq=%d "
|
||||||
"jgp=%d jgl=%d jbd=%d jga=%d "
|
"jgp=%d jgl=%d jbd=%d jga=%d "
|
||||||
"agp=%lf agl=%lf abd=%lf aga=%lf",
|
"agp=%d agl=%d abd=%d aga=%d",
|
||||||
mUtcTime.tv_sec, mUtcTime.tv_nsec,
|
mUtcTime.tv_sec, mUtcTime.tv_nsec,
|
||||||
mPgaGain,
|
mPgaGain,
|
||||||
mGpsBpAmpI,
|
mGpsBpAmpI,
|
||||||
|
@ -1448,6 +1642,35 @@ bool SystemStatus::setNmeaString(const char *data, uint32_t len)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SystemStatus::setEngineDebugDataInfo(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo) {
|
||||||
|
pthread_mutex_lock(&mMutexSystemStatus);
|
||||||
|
LOC_LOGd("setEngine data");
|
||||||
|
SystemStatusPQWM1 s(gnssEngineDebugDataInfo);
|
||||||
|
setIteminReport(mCache.mTimeAndClock, SystemStatusTimeAndClock(s));
|
||||||
|
setIteminReport(mCache.mXoState, SystemStatusXoState(s));
|
||||||
|
setIteminReport(mCache.mRfAndParams, SystemStatusRfAndParams(s));
|
||||||
|
setIteminReport(mCache.mErrRecovery, SystemStatusErrRecovery(s));
|
||||||
|
setIteminReport(mCache.mInjectedPosition,
|
||||||
|
SystemStatusInjectedPosition(SystemStatusPQWP1(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mBestPosition,
|
||||||
|
SystemStatusBestPosition(SystemStatusPQWP2(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mXtra,
|
||||||
|
SystemStatusXtra(SystemStatusPQWP3(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mEphemeris,
|
||||||
|
SystemStatusEphemeris(SystemStatusPQWP4(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mSvHealth,
|
||||||
|
SystemStatusSvHealth(SystemStatusPQWP5(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mPdr,
|
||||||
|
SystemStatusPdr(SystemStatusPQWP6(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mNavData,
|
||||||
|
SystemStatusNavData(SystemStatusPQWP7(gnssEngineDebugDataInfo)));
|
||||||
|
setIteminReport(mCache.mPositionFailure,
|
||||||
|
SystemStatusPositionFailure(SystemStatusPQWS1(gnssEngineDebugDataInfo)));
|
||||||
|
pthread_mutex_unlock(&mMutexSystemStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@brief API to set report position data into internal buffer
|
@brief API to set report position data into internal buffer
|
||||||
|
|
||||||
|
@ -1602,9 +1825,10 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem)
|
||||||
|
|
||||||
@return true when successfully done
|
@return true when successfully done
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly) const {
|
bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly,
|
||||||
|
bool inSessionOnly) const {
|
||||||
pthread_mutex_lock(&mMutexSystemStatus);
|
pthread_mutex_lock(&mMutexSystemStatus);
|
||||||
if (!mTracking) {
|
if (inSessionOnly && !mTracking) {
|
||||||
pthread_mutex_unlock(&mMutexSystemStatus);
|
pthread_mutex_unlock(&mMutexSystemStatus);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1773,7 +1997,21 @@ bool SystemStatus::updatePowerConnectState(bool charging)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
bool SystemStatus::eventOptInStatus(bool userConsent)
|
bool SystemStatus::eventOptInStatus(bool userConsent)
|
||||||
{
|
{
|
||||||
SystemStatusENH s(userConsent);
|
SystemStatusENH s(userConsent, ENHDataItem::FIELD_CONSENT);
|
||||||
|
mSysStatusObsvr.notify({&s.mDataItem});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
@brief API to update Region
|
||||||
|
|
||||||
|
@param[In] region
|
||||||
|
|
||||||
|
@return true when successfully done
|
||||||
|
******************************************************************************/
|
||||||
|
bool SystemStatus::eventRegionStatus(bool region)
|
||||||
|
{
|
||||||
|
SystemStatusENH s(region, ENHDataItem::FIELD_REGION);
|
||||||
mSysStatusObsvr.notify({&s.mDataItem});
|
mSysStatusObsvr.notify({&s.mDataItem});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __SYSTEM_STATUS__
|
#ifndef __SYSTEM_STATUS__
|
||||||
#define __SYSTEM_STATUS__
|
#define __SYSTEM_STATUS__
|
||||||
|
|
||||||
|
@ -161,16 +198,18 @@ public:
|
||||||
uint32_t mJammerGlo;
|
uint32_t mJammerGlo;
|
||||||
uint32_t mJammerBds;
|
uint32_t mJammerBds;
|
||||||
uint32_t mJammerGal;
|
uint32_t mJammerGal;
|
||||||
double mAgcGps;
|
uint32_t mAgcGps;
|
||||||
double mAgcGlo;
|
uint32_t mAgcGlo;
|
||||||
double mAgcBds;
|
uint32_t mAgcBds;
|
||||||
double mAgcGal;
|
uint32_t mAgcGal;
|
||||||
uint32_t mGloBpAmpI;
|
uint32_t mGloBpAmpI;
|
||||||
uint32_t mGloBpAmpQ;
|
uint32_t mGloBpAmpQ;
|
||||||
uint32_t mBdsBpAmpI;
|
uint32_t mBdsBpAmpI;
|
||||||
uint32_t mBdsBpAmpQ;
|
uint32_t mBdsBpAmpQ;
|
||||||
uint32_t mGalBpAmpI;
|
uint32_t mGalBpAmpI;
|
||||||
uint32_t mGalBpAmpQ;
|
uint32_t mGalBpAmpQ;
|
||||||
|
uint32_t mJammedSignalsMask;
|
||||||
|
std::vector<GnssJammerData> mJammerData;
|
||||||
inline SystemStatusRfAndParams() :
|
inline SystemStatusRfAndParams() :
|
||||||
mPgaGain(0),
|
mPgaGain(0),
|
||||||
mGpsBpAmpI(0),
|
mGpsBpAmpI(0),
|
||||||
|
@ -190,7 +229,8 @@ public:
|
||||||
mBdsBpAmpI(0),
|
mBdsBpAmpI(0),
|
||||||
mBdsBpAmpQ(0),
|
mBdsBpAmpQ(0),
|
||||||
mGalBpAmpI(0),
|
mGalBpAmpI(0),
|
||||||
mGalBpAmpQ(0) {}
|
mGalBpAmpQ(0),
|
||||||
|
mJammedSignalsMask(0) {}
|
||||||
inline SystemStatusRfAndParams(const SystemStatusPQWM1& nmea);
|
inline SystemStatusRfAndParams(const SystemStatusPQWM1& nmea);
|
||||||
bool equals(const SystemStatusItemBase& peer) override;
|
bool equals(const SystemStatusItemBase& peer) override;
|
||||||
void dump(void) override;
|
void dump(void) override;
|
||||||
|
@ -423,10 +463,16 @@ public:
|
||||||
class SystemStatusENH : public SystemStatusItemBase {
|
class SystemStatusENH : public SystemStatusItemBase {
|
||||||
public:
|
public:
|
||||||
ENHDataItem mDataItem;
|
ENHDataItem mDataItem;
|
||||||
inline SystemStatusENH(bool enabled=false): mDataItem(enabled) {}
|
inline SystemStatusENH(bool enabled, ENHDataItem::Fields updateBit = ENHDataItem::FIELD_MAX):
|
||||||
|
mDataItem(enabled, updateBit) {}
|
||||||
inline SystemStatusENH(const ENHDataItem& itemBase): mDataItem(itemBase) {}
|
inline SystemStatusENH(const ENHDataItem& itemBase): mDataItem(itemBase) {}
|
||||||
|
inline virtual SystemStatusItemBase& collate(SystemStatusItemBase& peer) {
|
||||||
|
mDataItem.mEnhFields = ((const SystemStatusENH&)peer).mDataItem.mEnhFields;
|
||||||
|
mDataItem.updateFields();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
inline bool equals(const SystemStatusItemBase& peer) override {
|
inline bool equals(const SystemStatusItemBase& peer) override {
|
||||||
return mDataItem.mEnabled == ((const SystemStatusENH&)peer).mDataItem.mEnabled;
|
return mDataItem.mEnhFields == ((const SystemStatusENH&)peer).mDataItem.mEnhFields;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -887,13 +933,16 @@ public:
|
||||||
bool eventPosition(const UlpLocation& location,const GpsLocationExtended& locationEx);
|
bool eventPosition(const UlpLocation& location,const GpsLocationExtended& locationEx);
|
||||||
bool eventDataItemNotify(IDataItemCore* dataitem);
|
bool eventDataItemNotify(IDataItemCore* dataitem);
|
||||||
bool setNmeaString(const char *data, uint32_t len);
|
bool setNmeaString(const char *data, uint32_t len);
|
||||||
bool getReport(SystemStatusReports& reports, bool isLatestonly = false) const;
|
bool getReport(SystemStatusReports& reports, bool isLatestonly = false,
|
||||||
|
bool inSessionOnly = true) const;
|
||||||
|
void setEngineDebugDataInfo(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo);
|
||||||
bool setDefaultGnssEngineStates(void);
|
bool setDefaultGnssEngineStates(void);
|
||||||
bool eventConnectionStatus(bool connected, int8_t type,
|
bool eventConnectionStatus(bool connected, int8_t type,
|
||||||
bool roaming, NetworkHandle networkHandle, string& apn);
|
bool roaming, NetworkHandle networkHandle, string& apn);
|
||||||
bool updatePowerConnectState(bool charging);
|
bool updatePowerConnectState(bool charging);
|
||||||
void resetNetworkInfo();
|
void resetNetworkInfo();
|
||||||
bool eventOptInStatus(bool userConsent);
|
bool eventOptInStatus(bool userConsent);
|
||||||
|
bool eventRegionStatus(bool region);
|
||||||
bool eventInEmergencyCall(bool isEmergency);
|
bool eventInEmergencyCall(bool isEmergency);
|
||||||
void setTracking(bool tracking);
|
void setTracking(bool tracking);
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,6 +27,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
|
*/
|
||||||
|
|
||||||
#include "DataItemConcreteTypes.h"
|
#include "DataItemConcreteTypes.h"
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <log_util.h>
|
#include <log_util.h>
|
||||||
|
@ -146,8 +152,26 @@ void ENHDataItem::stringify(string& valueStr) {
|
||||||
STRINGIFY_ERROR_CHECK_AND_DOWN_CAST(ENHDataItem, ENH_DATA_ITEM_ID);
|
STRINGIFY_ERROR_CHECK_AND_DOWN_CAST(ENHDataItem, ENH_DATA_ITEM_ID);
|
||||||
valueStr.clear ();
|
valueStr.clear ();
|
||||||
valueStr = ENH_FIELD_ENABLED;
|
valueStr = ENH_FIELD_ENABLED;
|
||||||
|
if (!d->isEnabled()) {
|
||||||
|
Fields field = FIELD_MAX;
|
||||||
|
switch (mFieldUpdate) {
|
||||||
|
case FIELD_CONSENT:
|
||||||
|
valueStr += "_FIELD_CONSENT";
|
||||||
|
field = FIELD_CONSENT;
|
||||||
|
break;
|
||||||
|
case FIELD_REGION:
|
||||||
|
valueStr += "_FIELD_REGION";
|
||||||
|
field = FIELD_REGION;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
valueStr += ": ";
|
valueStr += ": ";
|
||||||
valueStr += (d->mEnabled) ? ("true") : ("false");
|
valueStr += (((1 << field) & d->mEnhFields) != 0) ? "true" : "false";
|
||||||
|
} else {
|
||||||
|
valueStr += ": ";
|
||||||
|
valueStr += "true";
|
||||||
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
EXIT_LOG_WITH_ERROR("%d", result);
|
EXIT_LOG_WITH_ERROR("%d", result);
|
||||||
}
|
}
|
||||||
|
@ -582,8 +606,17 @@ int32_t ENHDataItem::copyFrom(IDataItemCore* src) {
|
||||||
ENTRY_LOG();
|
ENTRY_LOG();
|
||||||
do {
|
do {
|
||||||
COPIER_ERROR_CHECK_AND_DOWN_CAST(ENHDataItem, ENH_DATA_ITEM_ID);
|
COPIER_ERROR_CHECK_AND_DOWN_CAST(ENHDataItem, ENH_DATA_ITEM_ID);
|
||||||
if (s->mEnabled == d->mEnabled) { result = true; break; }
|
if (s->mEnhFields == d->mEnhFields) { result = true; break; }
|
||||||
s->mEnabled = d->mEnabled;
|
switch (d->mAction) {
|
||||||
|
case SET:
|
||||||
|
s->mEnhFields |= (1 << d->mFieldUpdate);
|
||||||
|
break;
|
||||||
|
case CLEAR:
|
||||||
|
s->mEnhFields &= ~(1 << d->mFieldUpdate);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
result = 0;
|
result = 0;
|
||||||
} while (0);
|
} while (0);
|
||||||
EXIT_LOG_WITH_ERROR("%d", result);
|
EXIT_LOG_WITH_ERROR("%d", result);
|
||||||
|
|
|
@ -27,6 +27,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef DATAITEM_CONCRETETYPES_H
|
#ifndef DATAITEM_CONCRETETYPES_H
|
||||||
#define DATAITEM_CONCRETETYPES_H
|
#define DATAITEM_CONCRETETYPES_H
|
||||||
|
|
||||||
|
@ -143,13 +149,46 @@ public:
|
||||||
|
|
||||||
class ENHDataItem: public IDataItemCore {
|
class ENHDataItem: public IDataItemCore {
|
||||||
public:
|
public:
|
||||||
ENHDataItem(bool enabled = false) :
|
enum Fields { FIELD_CONSENT, FIELD_REGION, FIELD_MAX };
|
||||||
mEnabled(enabled) {mId = ENH_DATA_ITEM_ID;}
|
enum Actions { NO_OP, SET, CLEAR };
|
||||||
|
ENHDataItem(bool enabled = false, Fields updateBit = FIELD_MAX) :
|
||||||
|
mEnhFields(0), mFieldUpdate(updateBit) {
|
||||||
|
mId = ENH_DATA_ITEM_ID;
|
||||||
|
setAction(enabled ? SET : CLEAR);
|
||||||
|
}
|
||||||
virtual ~ENHDataItem() {}
|
virtual ~ENHDataItem() {}
|
||||||
virtual void stringify(string& /*valueStr*/) override;
|
virtual void stringify(string& /*valueStr*/) override;
|
||||||
virtual int32_t copyFrom(IDataItemCore* /*src*/) override;
|
virtual int32_t copyFrom(IDataItemCore* /*src*/) override;
|
||||||
|
inline bool isEnabled() const {
|
||||||
|
uint8_t combinedBits = (1 << FIELD_MAX) - 1;
|
||||||
|
return (combinedBits == (mEnhFields & combinedBits));
|
||||||
|
}
|
||||||
|
void setAction(Actions action = NO_OP) {
|
||||||
|
mAction = action;
|
||||||
|
if (NO_OP != mAction) {
|
||||||
|
updateFields();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void updateFields() {
|
||||||
|
if (FIELD_MAX > mFieldUpdate) {
|
||||||
|
switch (mAction) {
|
||||||
|
case SET:
|
||||||
|
mEnhFields |= (1 << mFieldUpdate);
|
||||||
|
break;
|
||||||
|
case CLEAR:
|
||||||
|
mEnhFields &= ~(1 << mFieldUpdate);
|
||||||
|
break;
|
||||||
|
case NO_OP:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Data members
|
// Data members
|
||||||
bool mEnabled;
|
uint32_t mEnhFields;
|
||||||
|
private:
|
||||||
|
Actions mAction;
|
||||||
|
Fields mFieldUpdate;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GPSStateDataItem: public IDataItemCore {
|
class GPSStateDataItem: public IDataItemCore {
|
||||||
|
|
|
@ -323,17 +323,6 @@ MODEM_TYPE = 1
|
||||||
# other position engines.
|
# other position engines.
|
||||||
#POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0
|
#POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0
|
||||||
|
|
||||||
##################################################
|
|
||||||
# ROBUST LOCATION MODE
|
|
||||||
##################################################
|
|
||||||
# This setting enables or disables robust location
|
|
||||||
# 2.x feature used by the GNSS standard position engine.
|
|
||||||
# 0th bit: set to 1 to enable robust location
|
|
||||||
# 1th bit: set to 1 to enable robust location on E911
|
|
||||||
# this bit is ignored if 0th bit is not set.
|
|
||||||
# All other bits will be ignored.
|
|
||||||
#ROBUST_LOCATION_ENABLED = 0
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# package names and NFW entities they control
|
# package names and NFW entities they control
|
||||||
#####################################
|
#####################################
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
cc_library_shared {
|
cc_library_shared {
|
||||||
|
|
||||||
name: "libgnss",
|
name: "libgnss",
|
||||||
|
defaults: ["qtilocation_common_defaults"],
|
||||||
vendor: true,
|
vendor: true,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libutils",
|
"libutils",
|
||||||
"libcutils",
|
"libcutils",
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#define LOG_NDEBUG 0
|
#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "LocSvc_GnssAdapter"
|
#define LOG_TAG "LocSvc_GnssAdapter"
|
||||||
|
|
||||||
|
@ -53,7 +90,7 @@
|
||||||
#define RAD2DEG (180.0 / M_PI)
|
#define RAD2DEG (180.0 / M_PI)
|
||||||
#define DEG2RAD (M_PI / 180.0)
|
#define DEG2RAD (M_PI / 180.0)
|
||||||
#define PROCESS_NAME_ENGINE_SERVICE "engine-service"
|
#define PROCESS_NAME_ENGINE_SERVICE "engine-service"
|
||||||
#ifdef FEATURE_AUTOMOTIVE
|
#if defined (FEATURE_AUTOMOTIVE) || defined (FEATURE_NHZ_ENABLED)
|
||||||
#define MIN_TRACKING_INTERVAL (100) // 100 msec
|
#define MIN_TRACKING_INTERVAL (100) // 100 msec
|
||||||
#else
|
#else
|
||||||
#define MIN_TRACKING_INTERVAL (1000) // 1 sec
|
#define MIN_TRACKING_INTERVAL (1000) // 1 sec
|
||||||
|
@ -140,7 +177,6 @@ GnssAdapter::GnssAdapter() :
|
||||||
mBootReferenceEnergy(0),
|
mBootReferenceEnergy(0),
|
||||||
mPowerElapsedRealTimeCal(30000000),
|
mPowerElapsedRealTimeCal(30000000),
|
||||||
mIsMeasCorrInterfaceOpen(false),
|
mIsMeasCorrInterfaceOpen(false),
|
||||||
mIsAntennaInfoInterfaceOpened(false),
|
|
||||||
mQDgnssListenerHDL(nullptr),
|
mQDgnssListenerHDL(nullptr),
|
||||||
mCdfwInterface(nullptr),
|
mCdfwInterface(nullptr),
|
||||||
mDGnssNeedReport(false),
|
mDGnssNeedReport(false),
|
||||||
|
@ -383,7 +419,7 @@ void GnssAdapter::fillElapsedRealTime(const GpsLocationExtended& locationExtende
|
||||||
int64_t elapsedTimeNs = 0;
|
int64_t elapsedTimeNs = 0;
|
||||||
float elapsedTimeUncMsec = 0.0;
|
float elapsedTimeUncMsec = 0.0;
|
||||||
if (mPositionElapsedRealTimeCal.getElapsedRealtimeForGpsTime(
|
if (mPositionElapsedRealTimeCal.getElapsedRealtimeForGpsTime(
|
||||||
locationExtended.gpsTime, elapsedTimeNs, elapsedTimeUncMsec)) {
|
locationExtended, elapsedTimeNs, elapsedTimeUncMsec)) {
|
||||||
out.flags |= LOCATION_HAS_ELAPSED_REAL_TIME_BIT;
|
out.flags |= LOCATION_HAS_ELAPSED_REAL_TIME_BIT;
|
||||||
out.elapsedRealTime = elapsedTimeNs;
|
out.elapsedRealTime = elapsedTimeNs;
|
||||||
out.elapsedRealTimeUnc = (int64_t) (elapsedTimeUncMsec * 1000000);
|
out.elapsedRealTimeUnc = (int64_t) (elapsedTimeUncMsec * 1000000);
|
||||||
|
@ -976,6 +1012,7 @@ GnssAdapter::setConfig()
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s]: ", __func__);
|
LOC_LOGD("%s]: ", __func__);
|
||||||
|
|
||||||
|
if (!ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
// set nmea mask type
|
// set nmea mask type
|
||||||
uint32_t mask = 0;
|
uint32_t mask = 0;
|
||||||
if (NMEA_PROVIDER_MP == ContextBase::mGps_conf.NMEA_PROVIDER) {
|
if (NMEA_PROVIDER_MP == ContextBase::mGps_conf.NMEA_PROVIDER) {
|
||||||
|
@ -984,9 +1021,11 @@ GnssAdapter::setConfig()
|
||||||
mask |= LOC_NMEA_MASK_TAGBLOCK_V02;
|
mask |= LOC_NMEA_MASK_TAGBLOCK_V02;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_DEBUG_NMEA_V02)) {
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_DEBUG_NMEA_V02)) {
|
||||||
mask |= LOC_NMEA_MASK_DEBUG_V02;
|
mask |= LOC_NMEA_MASK_DEBUG_V02;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mNmeaMask != mask) {
|
if (mNmeaMask != mask) {
|
||||||
mNmeaMask = mask;
|
mNmeaMask = mask;
|
||||||
if (mNmeaMask) {
|
if (mNmeaMask) {
|
||||||
|
@ -999,6 +1038,12 @@ GnssAdapter::setConfig()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Modem does not provide noraml NMEA if ENGINE_DEBUG_DATA feature is available
|
||||||
|
// ensuring AP to nmea generation in this case
|
||||||
|
ContextBase::mGps_conf.NMEA_PROVIDER = NMEA_PROVIDER_AP;
|
||||||
|
updateEvtMask(LOC_API_ADAPTER_BIT_ENGINE_DEBUG_DATA_REPORT, LOC_REGISTRATION_MASK_ENABLED);
|
||||||
|
}
|
||||||
|
|
||||||
std::string oldMoServerUrl = getMoServerUrl();
|
std::string oldMoServerUrl = getMoServerUrl();
|
||||||
setSuplHostServer(ContextBase::mGps_conf.SUPL_HOST,
|
setSuplHostServer(ContextBase::mGps_conf.SUPL_HOST,
|
||||||
|
@ -1064,6 +1109,9 @@ GnssAdapter::setConfig()
|
||||||
|
|
||||||
// set nmea mask type
|
// set nmea mask type
|
||||||
uint32_t mask = 0;
|
uint32_t mask = 0;
|
||||||
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
|
mask |= LOC_API_ADAPTER_BIT_ENGINE_DEBUG_DATA_REPORT;
|
||||||
|
} else {
|
||||||
if (NMEA_PROVIDER_MP == gpsConf.NMEA_PROVIDER) {
|
if (NMEA_PROVIDER_MP == gpsConf.NMEA_PROVIDER) {
|
||||||
mask |= LOC_NMEA_ALL_GENERAL_SUPPORTED_MASK;
|
mask |= LOC_NMEA_ALL_GENERAL_SUPPORTED_MASK;
|
||||||
if (gpsConf.NMEA_TAG_BLOCK_GROUPING_ENABLED) {
|
if (gpsConf.NMEA_TAG_BLOCK_GROUPING_ENABLED) {
|
||||||
|
@ -1077,7 +1125,7 @@ GnssAdapter::setConfig()
|
||||||
if (mask != 0) {
|
if (mask != 0) {
|
||||||
mLocApi->setNMEATypesSync(mask);
|
mLocApi->setNMEATypesSync(mask);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// load tunc configuration from config file on first boot-up,
|
// load tunc configuration from config file on first boot-up,
|
||||||
// e.g.: adapter.mLocConfigInfo.tuncConfigInfo.isValid is false
|
// e.g.: adapter.mLocConfigInfo.tuncConfigInfo.isValid is false
|
||||||
if (mLocConfigInfo.tuncConfigInfo.isValid == false) {
|
if (mLocConfigInfo.tuncConfigInfo.isValid == false) {
|
||||||
|
@ -1105,15 +1153,11 @@ GnssAdapter::setConfig()
|
||||||
mLocApi->setPositionAssistedClockEstimatorMode(
|
mLocApi->setPositionAssistedClockEstimatorMode(
|
||||||
mLocConfigInfo.paceConfigInfo.enable);
|
mLocConfigInfo.paceConfigInfo.enable);
|
||||||
|
|
||||||
// load robust location configuration from config file on first boot-up,
|
// robust location to be disabled on bootup by default
|
||||||
// e.g.: adapter.mLocConfigInfo.robustLocationConfigInfo.isValid is false
|
|
||||||
if (mLocConfigInfo.robustLocationConfigInfo.isValid == false) {
|
if (mLocConfigInfo.robustLocationConfigInfo.isValid == false) {
|
||||||
mLocConfigInfo.robustLocationConfigInfo.isValid = true;
|
mLocConfigInfo.robustLocationConfigInfo.isValid = true;
|
||||||
bool robustLocationEnabled = (gpsConf.ROBUST_LOCATION_ENABLED & 0x01);
|
mLocConfigInfo.robustLocationConfigInfo.enable = false;
|
||||||
bool robustLocationE911Enabled = robustLocationEnabled ?
|
mLocConfigInfo.robustLocationConfigInfo.enableFor911 = false;
|
||||||
((gpsConf.ROBUST_LOCATION_ENABLED & 0x02) != 0) : false;
|
|
||||||
mLocConfigInfo.robustLocationConfigInfo.enable = robustLocationEnabled;
|
|
||||||
mLocConfigInfo.robustLocationConfigInfo.enableFor911 = robustLocationE911Enabled;
|
|
||||||
}
|
}
|
||||||
mLocApi->configRobustLocation(
|
mLocApi->configRobustLocation(
|
||||||
mLocConfigInfo.robustLocationConfigInfo.enable,
|
mLocConfigInfo.robustLocationConfigInfo.enable,
|
||||||
|
@ -2656,7 +2700,8 @@ GnssAdapter::updateClientsEventMask()
|
||||||
// need to register for leap second info
|
// need to register for leap second info
|
||||||
// for proper nmea generation
|
// for proper nmea generation
|
||||||
LOC_API_ADAPTER_EVENT_MASK_T mask = LOC_API_ADAPTER_BIT_LOC_SYSTEM_INFO |
|
LOC_API_ADAPTER_EVENT_MASK_T mask = LOC_API_ADAPTER_BIT_LOC_SYSTEM_INFO |
|
||||||
LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO;
|
LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO |
|
||||||
|
LOC_API_ADAPTER_BIT_FEATURE_STATUS_UPDATE;
|
||||||
for (auto it=mClientData.begin(); it != mClientData.end(); ++it) {
|
for (auto it=mClientData.begin(); it != mClientData.end(); ++it) {
|
||||||
if (it->second.trackingCb != nullptr ||
|
if (it->second.trackingCb != nullptr ||
|
||||||
it->second.gnssLocationInfoCb != nullptr ||
|
it->second.gnssLocationInfoCb != nullptr ||
|
||||||
|
@ -2666,9 +2711,13 @@ GnssAdapter::updateClientsEventMask()
|
||||||
if (it->second.gnssSvCb != nullptr) {
|
if (it->second.gnssSvCb != nullptr) {
|
||||||
mask |= LOC_API_ADAPTER_BIT_SATELLITE_REPORT;
|
mask |= LOC_API_ADAPTER_BIT_SATELLITE_REPORT;
|
||||||
}
|
}
|
||||||
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
|
mask |= LOC_API_ADAPTER_BIT_ENGINE_DEBUG_DATA_REPORT;
|
||||||
|
} else {
|
||||||
if ((it->second.gnssNmeaCb != nullptr) && (mNmeaMask)) {
|
if ((it->second.gnssNmeaCb != nullptr) && (mNmeaMask)) {
|
||||||
mask |= LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT;
|
mask |= LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (it->second.gnssMeasurementsCb != nullptr) {
|
if (it->second.gnssMeasurementsCb != nullptr) {
|
||||||
mask |= LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT;
|
mask |= LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT;
|
||||||
if (nullptr != mPowerIndicationCb) {
|
if (nullptr != mPowerIndicationCb) {
|
||||||
|
@ -2685,10 +2734,14 @@ GnssAdapter::updateClientsEventMask()
|
||||||
}
|
}
|
||||||
if (it->second.gnssDataCb != nullptr) {
|
if (it->second.gnssDataCb != nullptr) {
|
||||||
mask |= LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT;
|
mask |= LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT;
|
||||||
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
|
mask |= LOC_API_ADAPTER_BIT_ENGINE_DEBUG_DATA_REPORT;
|
||||||
|
} else {
|
||||||
mask |= LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT;
|
mask |= LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT;
|
||||||
updateNmeaMask(mNmeaMask | LOC_NMEA_MASK_DEBUG_V02);
|
updateNmeaMask(mNmeaMask | LOC_NMEA_MASK_DEBUG_V02);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** For Automotive use cases we need to enable MEASUREMENT, POLY and EPHEMERIS
|
** For Automotive use cases we need to enable MEASUREMENT, POLY and EPHEMERIS
|
||||||
|
@ -2821,7 +2874,7 @@ GnssAdapter::suspendSessions()
|
||||||
if (!mTimeBasedTrackingSessions.empty()) {
|
if (!mTimeBasedTrackingSessions.empty()) {
|
||||||
// inform engine hub that GNSS session has stopped
|
// inform engine hub that GNSS session has stopped
|
||||||
mEngHubProxy->gnssStopFix();
|
mEngHubProxy->gnssStopFix();
|
||||||
mLocApi->stopFix(nullptr);
|
mLocApi->stopTimeBasedTracking(nullptr);
|
||||||
if (isDgnssNmeaRequired()) {
|
if (isDgnssNmeaRequired()) {
|
||||||
mDgnssState &= ~DGNSS_STATE_NO_NMEA_PENDING;
|
mDgnssState &= ~DGNSS_STATE_NO_NMEA_PENDING;
|
||||||
}
|
}
|
||||||
|
@ -2902,6 +2955,9 @@ GnssAdapter::getCapabilities()
|
||||||
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_AGPM_V02)) {
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_AGPM_V02)) {
|
||||||
mask |= LOCATION_CAPABILITIES_AGPM_BIT;
|
mask |= LOCATION_CAPABILITIES_AGPM_BIT;
|
||||||
}
|
}
|
||||||
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
|
mask |= LOCATION_CAPABILITIES_ENGINE_DEBUG_DATA_BIT;
|
||||||
|
}
|
||||||
//Get QWES feature status mask
|
//Get QWES feature status mask
|
||||||
mask |= ContextBase::getQwesFeatureStatus();
|
mask |= ContextBase::getQwesFeatureStatus();
|
||||||
return mask;
|
return mask;
|
||||||
|
@ -2970,13 +3026,6 @@ GnssAdapter::hasCallbacksToStartTracking(LocationAPI* client)
|
||||||
return allowed;
|
return allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
GnssAdapter::isTrackingSession(LocationAPI* client, uint32_t sessionId)
|
|
||||||
{
|
|
||||||
LocationSessionKey key(client, sessionId);
|
|
||||||
return (mTimeBasedTrackingSessions.find(key) != mTimeBasedTrackingSessions.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
GnssAdapter::reportPowerStateIfChanged()
|
GnssAdapter::reportPowerStateIfChanged()
|
||||||
{
|
{
|
||||||
|
@ -3026,6 +3075,7 @@ GnssAdapter::saveTrackingSession(LocationAPI* client, uint32_t sessionId,
|
||||||
reportPowerStateIfChanged();
|
reportPowerStateIfChanged();
|
||||||
// notify SystemStatus the engine tracking status
|
// notify SystemStatus the engine tracking status
|
||||||
getSystemStatus()->setTracking(isInSession());
|
getSystemStatus()->setTracking(isInSession());
|
||||||
|
mXtraObserver.notifySessionStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3212,6 +3262,10 @@ GnssAdapter::startTimeBasedTrackingMultiplex(LocationAPI* client, uint32_t sessi
|
||||||
it->second.powerMode < multiplexedPowerMode) {
|
it->second.powerMode < multiplexedPowerMode) {
|
||||||
multiplexedPowerMode = it->second.powerMode;
|
multiplexedPowerMode = it->second.powerMode;
|
||||||
}
|
}
|
||||||
|
//if not set or there is a new higher qualityLevelAccepted, then set the higher one
|
||||||
|
if (it->second.qualityLevelAccepted > multiplexedOptions.qualityLevelAccepted) {
|
||||||
|
multiplexedOptions.qualityLevelAccepted = it->second.qualityLevelAccepted;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool updateOptions = false;
|
bool updateOptions = false;
|
||||||
// if session we are starting has smaller interval then next smallest
|
// if session we are starting has smaller interval then next smallest
|
||||||
|
@ -3225,6 +3279,11 @@ GnssAdapter::startTimeBasedTrackingMultiplex(LocationAPI* client, uint32_t sessi
|
||||||
multiplexedOptions.powerMode = options.powerMode;
|
multiplexedOptions.powerMode = options.powerMode;
|
||||||
updateOptions = true;
|
updateOptions = true;
|
||||||
}
|
}
|
||||||
|
// if session we are starting has higher qualityLevelAccepted then next highest
|
||||||
|
if (options.qualityLevelAccepted > multiplexedOptions.qualityLevelAccepted) {
|
||||||
|
multiplexedOptions.qualityLevelAccepted = options.qualityLevelAccepted;
|
||||||
|
updateOptions = true;
|
||||||
|
}
|
||||||
if (updateOptions) {
|
if (updateOptions) {
|
||||||
// restart time based tracking with the newly updated options
|
// restart time based tracking with the newly updated options
|
||||||
|
|
||||||
|
@ -3599,7 +3658,10 @@ GnssAdapter::stopTracking(LocationAPI* client, uint32_t id)
|
||||||
// inform engine hub that GNSS session has stopped
|
// inform engine hub that GNSS session has stopped
|
||||||
mEngHubProxy->gnssStopFix();
|
mEngHubProxy->gnssStopFix();
|
||||||
|
|
||||||
mLocApi->stopFix(new LocApiResponse(*getContext(),
|
// client is nullptr when we want to stop any tracking session,
|
||||||
|
// e.g. when suspend.
|
||||||
|
mLocApi->stopTimeBasedTracking((nullptr == client) ? nullptr :
|
||||||
|
new LocApiResponse(*getContext(),
|
||||||
[this, client, id] (LocationError err) {
|
[this, client, id] (LocationError err) {
|
||||||
reportResponse(client, err, id);
|
reportResponse(client, err, id);
|
||||||
}));
|
}));
|
||||||
|
@ -4216,7 +4278,7 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation,
|
||||||
bool blank_fix = ((0 == ulpLocation.gpsLocation.latitude) &&
|
bool blank_fix = ((0 == ulpLocation.gpsLocation.latitude) &&
|
||||||
(0 == ulpLocation.gpsLocation.longitude) &&
|
(0 == ulpLocation.gpsLocation.longitude) &&
|
||||||
(LOC_RELIABILITY_NOT_SET == locationExtended.horizontal_reliability));
|
(LOC_RELIABILITY_NOT_SET == locationExtended.horizontal_reliability));
|
||||||
uint8_t generate_nmea = (reportToAllClients && status != LOC_SESS_FAILURE && !blank_fix);
|
uint8_t generate_nmea = (reportToAllClients && LOC_SESS_SUCCESS == status && !blank_fix);
|
||||||
bool custom_nmea_gga = (1 == ContextBase::mGps_conf.CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED);
|
bool custom_nmea_gga = (1 == ContextBase::mGps_conf.CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED);
|
||||||
bool isTagBlockGroupingEnabled =
|
bool isTagBlockGroupingEnabled =
|
||||||
(1 == ContextBase::mGps_conf.NMEA_TAG_BLOCK_GROUPING_ENABLED);
|
(1 == ContextBase::mGps_conf.NMEA_TAG_BLOCK_GROUPING_ENABLED);
|
||||||
|
@ -4242,6 +4304,30 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GnssAdapter::reportEngDebugDataInfo(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo) {
|
||||||
|
if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) {
|
||||||
|
LOC_LOGd("Recived Engine debug data info");
|
||||||
|
SystemStatus* s = getSystemStatus();
|
||||||
|
if (nullptr != s) {
|
||||||
|
s->setEngineDebugDataInfo(gnssEngineDebugDataInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GnssAdapter::reportEngDebugDataInfoEvent(GnssEngineDebugDataInfo& gnssEngineDebugDataInfo) {
|
||||||
|
struct MsgReportEngDebugDataInfo : public LocMsg {
|
||||||
|
GnssAdapter& mAdapter;
|
||||||
|
const GnssEngineDebugDataInfo mGnssEngineDebugDataInfo;
|
||||||
|
inline MsgReportEngDebugDataInfo(GnssAdapter& adapter, GnssEngineDebugDataInfo&
|
||||||
|
gnssEngineDebugDataInfo) : mGnssEngineDebugDataInfo(gnssEngineDebugDataInfo),
|
||||||
|
mAdapter(adapter) {}
|
||||||
|
inline virtual void proc() const {
|
||||||
|
mAdapter.reportEngDebugDataInfo(mGnssEngineDebugDataInfo);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
sendMsg(new MsgReportEngDebugDataInfo(*this, gnssEngineDebugDataInfo));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GnssAdapter::reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo)
|
GnssAdapter::reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo)
|
||||||
{
|
{
|
||||||
|
@ -5355,8 +5441,7 @@ GnssAdapter::invokeGnssEnergyConsumedCallback(uint64_t energyConsumedSinceFirstB
|
||||||
mBootReferenceEnergy,
|
mBootReferenceEnergy,
|
||||||
gnssPowerStatistics.totalEnergyMilliJoule);
|
gnssPowerStatistics.totalEnergyMilliJoule);
|
||||||
|
|
||||||
gnssPowerStatistics.elapsedRealTime =
|
gnssPowerStatistics.elapsedRealTime = elapsedRealtime();
|
||||||
mPowerElapsedRealTimeCal.getElapsedRealtimeEstimateNanos(0, 0, 0);
|
|
||||||
gnssPowerStatistics.elapsedRealTimeUnc =
|
gnssPowerStatistics.elapsedRealTimeUnc =
|
||||||
mPowerElapsedRealTimeCal.getElapsedRealtimeUncNanos();
|
mPowerElapsedRealTimeCal.getElapsedRealtimeUncNanos();
|
||||||
mPowerIndicationCb(gnssPowerStatistics);
|
mPowerIndicationCb(gnssPowerStatistics);
|
||||||
|
@ -5875,7 +5960,7 @@ bool GnssAdapter::getDebugReport(GnssDebugReport& r)
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemStatusReports reports;
|
SystemStatusReports reports;
|
||||||
systemstatus->getReport(reports, true);
|
systemstatus->getReport(reports, true, false);
|
||||||
|
|
||||||
r.size = sizeof(r);
|
r.size = sizeof(r);
|
||||||
|
|
||||||
|
@ -5982,7 +6067,7 @@ GnssAdapter::getAgcInformation(GnssMeasurementsNotification& measurements, int m
|
||||||
|
|
||||||
if (nullptr != systemstatus) {
|
if (nullptr != systemstatus) {
|
||||||
SystemStatusReports reports = {};
|
SystemStatusReports reports = {};
|
||||||
systemstatus->getReport(reports, true);
|
systemstatus->getReport(reports, true, false);
|
||||||
|
|
||||||
if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) &&
|
if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) &&
|
||||||
(abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) {
|
(abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) {
|
||||||
|
@ -5992,28 +6077,28 @@ GnssAdapter::getAgcInformation(GnssMeasurementsNotification& measurements, int m
|
||||||
case GNSS_SV_TYPE_GPS:
|
case GNSS_SV_TYPE_GPS:
|
||||||
case GNSS_SV_TYPE_QZSS:
|
case GNSS_SV_TYPE_QZSS:
|
||||||
measurements.measurements[i].agcLevelDb =
|
measurements.measurements[i].agcLevelDb =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGps;
|
-((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
measurements.measurements[i].flags |=
|
measurements.measurements[i].flags |=
|
||||||
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNSS_SV_TYPE_GALILEO:
|
case GNSS_SV_TYPE_GALILEO:
|
||||||
measurements.measurements[i].agcLevelDb =
|
measurements.measurements[i].agcLevelDb =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGal;
|
-((double)reports.mRfAndParams.back().mJammerGal / 100.0);
|
||||||
measurements.measurements[i].flags |=
|
measurements.measurements[i].flags |=
|
||||||
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNSS_SV_TYPE_GLONASS:
|
case GNSS_SV_TYPE_GLONASS:
|
||||||
measurements.measurements[i].agcLevelDb =
|
measurements.measurements[i].agcLevelDb =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGlo;
|
-((double)reports.mRfAndParams.back().mJammerGlo / 100.0);
|
||||||
measurements.measurements[i].flags |=
|
measurements.measurements[i].flags |=
|
||||||
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNSS_SV_TYPE_BEIDOU:
|
case GNSS_SV_TYPE_BEIDOU:
|
||||||
measurements.measurements[i].agcLevelDb =
|
measurements.measurements[i].agcLevelDb =
|
||||||
-(double)reports.mRfAndParams.back().mJammerBds;
|
-((double)reports.mRfAndParams.back().mJammerBds / 100.0);
|
||||||
measurements.measurements[i].flags |=
|
measurements.measurements[i].flags |=
|
||||||
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
GNSS_MEASUREMENTS_DATA_AUTOMATIC_GAIN_CONTROL_BIT;
|
||||||
break;
|
break;
|
||||||
|
@ -6037,7 +6122,7 @@ GnssAdapter::getDataInformation(GnssDataNotification& data, int msInWeek)
|
||||||
LOC_LOGV("%s]: msInWeek=%d", __func__, msInWeek);
|
LOC_LOGV("%s]: msInWeek=%d", __func__, msInWeek);
|
||||||
if (nullptr != systemstatus) {
|
if (nullptr != systemstatus) {
|
||||||
SystemStatusReports reports = {};
|
SystemStatusReports reports = {};
|
||||||
systemstatus->getReport(reports, true);
|
systemstatus->getReport(reports, true, false);
|
||||||
|
|
||||||
if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) &&
|
if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) &&
|
||||||
(abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) {
|
(abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) {
|
||||||
|
@ -6052,45 +6137,45 @@ GnssAdapter::getDataInformation(GnssDataNotification& data, int msInWeek)
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGps;
|
-((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GPS_L1CA] =
|
||||||
(double)reports.mRfAndParams.back().mJammerGps;
|
((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGps;
|
-((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_QZSS_L1CA] =
|
||||||
(double)reports.mRfAndParams.back().mJammerGps;
|
((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGps;
|
-((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA] =
|
||||||
(double)reports.mRfAndParams.back().mJammerGps;
|
((double)reports.mRfAndParams.back().mJammerGps / 100.0);
|
||||||
}
|
}
|
||||||
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerGlo) {
|
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerGlo) {
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGlo;
|
-((double)reports.mRfAndParams.back().mJammerGlo / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GLONASS_G1] =
|
||||||
(double)reports.mRfAndParams.back().mJammerGlo;
|
((double)reports.mRfAndParams.back().mJammerGlo / 100.0);
|
||||||
}
|
}
|
||||||
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerBds) {
|
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerBds) {
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerBds;
|
-((double)reports.mRfAndParams.back().mJammerBds / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_BEIDOU_B1_I] =
|
||||||
(double)reports.mRfAndParams.back().mJammerBds;
|
((double)reports.mRfAndParams.back().mJammerBds / 100.0);
|
||||||
}
|
}
|
||||||
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerGal) {
|
if (GNSS_INVALID_JAMMER_IND != reports.mRfAndParams.back().mJammerGal) {
|
||||||
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] |=
|
data.gnssDataMask[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] |=
|
||||||
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
GNSS_LOC_DATA_AGC_BIT | GNSS_LOC_DATA_JAMMER_IND_BIT;
|
||||||
data.agc[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] =
|
data.agc[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] =
|
||||||
-(double)reports.mRfAndParams.back().mJammerGal;
|
-((double)reports.mRfAndParams.back().mJammerGal / 100.0);
|
||||||
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] =
|
data.jammerInd[GNSS_LOC_SIGNAL_TYPE_GALILEO_E1_C] =
|
||||||
(double)reports.mRfAndParams.back().mJammerGal;
|
((double)reports.mRfAndParams.back().mJammerGal / 100.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6644,14 +6729,9 @@ uint32_t GnssAdapter::antennaInfoInitCommand(const antennaInfoCb antennaInfoCall
|
||||||
mAdapter.reportGnssAntennaInformation(mAntennaInfoCb);
|
mAdapter.reportGnssAntennaInformation(mAntennaInfoCb);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (mIsAntennaInfoInterfaceOpened) {
|
|
||||||
return ANTENNA_INFO_ERROR_ALREADY_INIT;
|
|
||||||
} else {
|
|
||||||
mIsAntennaInfoInterfaceOpened = true;
|
|
||||||
sendMsg(new MsgInitAi(antennaInfoCallback, *this));
|
sendMsg(new MsgInitAi(antennaInfoCallback, *this));
|
||||||
return ANTENNA_INFO_SUCCESS;
|
return ANTENNA_INFO_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
GnssAdapter::configRobustLocation(uint32_t sessionId,
|
GnssAdapter::configRobustLocation(uint32_t sessionId,
|
||||||
|
|
|
@ -26,6 +26,43 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_ADAPTER_H
|
#ifndef GNSS_ADAPTER_H
|
||||||
#define GNSS_ADAPTER_H
|
#define GNSS_ADAPTER_H
|
||||||
|
|
||||||
|
@ -246,7 +283,6 @@ class GnssAdapter : public LocAdapterBase {
|
||||||
bool mIsMeasCorrInterfaceOpen;
|
bool mIsMeasCorrInterfaceOpen;
|
||||||
measCorrSetCapabilitiesCb mMeasCorrSetCapabilitiesCb;
|
measCorrSetCapabilitiesCb mMeasCorrSetCapabilitiesCb;
|
||||||
bool initMeasCorr(bool bSendCbWhenNotSupported);
|
bool initMeasCorr(bool bSendCbWhenNotSupported);
|
||||||
bool mIsAntennaInfoInterfaceOpened;
|
|
||||||
|
|
||||||
/* ==== DGNSS Data Usable Report======================================================== */
|
/* ==== DGNSS Data Usable Report======================================================== */
|
||||||
QDgnssListenerHDL mQDgnssListenerHDL;
|
QDgnssListenerHDL mQDgnssListenerHDL;
|
||||||
|
@ -364,7 +400,6 @@ public:
|
||||||
bool isTimeBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
|
bool isTimeBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
|
||||||
bool isDistanceBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
|
bool isDistanceBasedTrackingSession(LocationAPI* client, uint32_t sessionId);
|
||||||
bool hasCallbacksToStartTracking(LocationAPI* client);
|
bool hasCallbacksToStartTracking(LocationAPI* client);
|
||||||
bool isTrackingSession(LocationAPI* client, uint32_t sessionId);
|
|
||||||
void saveTrackingSession(LocationAPI* client, uint32_t sessionId,
|
void saveTrackingSession(LocationAPI* client, uint32_t sessionId,
|
||||||
const TrackingOptions& trackingOptions);
|
const TrackingOptions& trackingOptions);
|
||||||
void eraseTrackingSession(LocationAPI* client, uint32_t sessionId);
|
void eraseTrackingSession(LocationAPI* client, uint32_t sessionId);
|
||||||
|
@ -477,7 +512,7 @@ public:
|
||||||
bool measCorrSetCorrectionsCommand(const GnssMeasurementCorrections gnssMeasCorr);
|
bool measCorrSetCorrectionsCommand(const GnssMeasurementCorrections gnssMeasCorr);
|
||||||
inline void closeMeasCorrCommand() { mIsMeasCorrInterfaceOpen = false; }
|
inline void closeMeasCorrCommand() { mIsMeasCorrInterfaceOpen = false; }
|
||||||
uint32_t antennaInfoInitCommand(const antennaInfoCb antennaInfoCallback);
|
uint32_t antennaInfoInitCommand(const antennaInfoCb antennaInfoCallback);
|
||||||
inline void antennaInfoCloseCommand() { mIsAntennaInfoInterfaceOpened = false; }
|
inline void antennaInfoCloseCommand() {}
|
||||||
uint32_t configMinGpsWeekCommand(uint16_t minGpsWeek);
|
uint32_t configMinGpsWeekCommand(uint16_t minGpsWeek);
|
||||||
uint32_t configDeadReckoningEngineParamsCommand(const DeadReckoningEngineConfig& dreConfig);
|
uint32_t configDeadReckoningEngineParamsCommand(const DeadReckoningEngineConfig& dreConfig);
|
||||||
uint32_t configEngineRunStateCommand(PositioningEngineMask engType,
|
uint32_t configEngineRunStateCommand(PositioningEngineMask engType,
|
||||||
|
@ -546,6 +581,8 @@ public:
|
||||||
GnssAdditionalSystemInfo& additionalSystemInfo);
|
GnssAdditionalSystemInfo& additionalSystemInfo);
|
||||||
virtual void reportNfwNotificationEvent(GnssNfwNotification& notification);
|
virtual void reportNfwNotificationEvent(GnssNfwNotification& notification);
|
||||||
virtual void reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo);
|
virtual void reportLatencyInfoEvent(const GnssLatencyInfo& gnssLatencyInfo);
|
||||||
|
virtual void reportEngDebugDataInfoEvent(GnssEngineDebugDataInfo&
|
||||||
|
gnssEngineDebugDataInfo) override;
|
||||||
virtual bool reportQwesCapabilities
|
virtual bool reportQwesCapabilities
|
||||||
(
|
(
|
||||||
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap
|
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap
|
||||||
|
@ -618,7 +655,7 @@ public:
|
||||||
void getAgcInformation(GnssMeasurementsNotification& measurements, int msInWeek);
|
void getAgcInformation(GnssMeasurementsNotification& measurements, int msInWeek);
|
||||||
/* get Data information from system status and fill it */
|
/* get Data information from system status and fill it */
|
||||||
void getDataInformation(GnssDataNotification& data, int msInWeek);
|
void getDataInformation(GnssDataNotification& data, int msInWeek);
|
||||||
|
void reportEngDebugDataInfo(const GnssEngineDebugDataInfo& gnssEngineDebugDataInfo);
|
||||||
/*==== SYSTEM STATUS ================================================================*/
|
/*==== SYSTEM STATUS ================================================================*/
|
||||||
inline SystemStatus* getSystemStatus(void) { return mSystemStatus; }
|
inline SystemStatus* getSystemStatus(void) { return mSystemStatus; }
|
||||||
std::string& getServerUrl(void) { return mServerUrl; }
|
std::string& getServerUrl(void) { return mServerUrl; }
|
||||||
|
|
|
@ -26,6 +26,42 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
#define LOG_TAG "LocSvc_XtraSystemStatusObs"
|
#define LOG_TAG "LocSvc_XtraSystemStatusObs"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -226,6 +262,15 @@ bool XtraSystemStatusObserver::updateXtraThrottle(const bool enabled) {
|
||||||
return ( LocIpc::send(*mXtraSender, (const uint8_t*)s.data(), s.size()) );
|
return ( LocIpc::send(*mXtraSender, (const uint8_t*)s.data(), s.size()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool XtraSystemStatusObserver::notifySessionStart() {
|
||||||
|
if (!mReqStatusReceived) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
string s = "sessionstart";
|
||||||
|
return ( LocIpc::send(*mXtraSender, (const uint8_t*)s.data(), s.size()) );
|
||||||
|
}
|
||||||
|
|
||||||
inline bool XtraSystemStatusObserver::onStatusRequested(int32_t statusUpdated) {
|
inline bool XtraSystemStatusObserver::onStatusRequested(int32_t statusUpdated) {
|
||||||
mReqStatusReceived = true;
|
mReqStatusReceived = true;
|
||||||
|
|
||||||
|
@ -313,7 +358,6 @@ void XtraSystemStatusObserver::subscribe(bool yes)
|
||||||
|
|
||||||
if (yes) {
|
if (yes) {
|
||||||
mSystemStatusObsrvr->subscribe(subItemIdSet, this);
|
mSystemStatusObsrvr->subscribe(subItemIdSet, this);
|
||||||
|
|
||||||
unordered_set<DataItemId> reqItemIdSet;
|
unordered_set<DataItemId> reqItemIdSet;
|
||||||
reqItemIdSet.insert(TAC_DATA_ITEM_ID);
|
reqItemIdSet.insert(TAC_DATA_ITEM_ID);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,13 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef XTRA_SYSTEM_STATUS_OBS_H
|
#ifndef XTRA_SYSTEM_STATUS_OBS_H
|
||||||
#define XTRA_SYSTEM_STATUS_OBS_H
|
#define XTRA_SYSTEM_STATUS_OBS_H
|
||||||
|
|
||||||
|
@ -78,6 +85,7 @@ public :
|
||||||
bool updateXtraThrottle(const bool enabled);
|
bool updateXtraThrottle(const bool enabled);
|
||||||
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
inline const MsgTask* getMsgTask() { return mMsgTask; }
|
||||||
void subscribe(bool yes);
|
void subscribe(bool yes);
|
||||||
|
bool notifySessionStart();
|
||||||
bool onStatusRequested(int32_t xtraStatusUpdated);
|
bool onStatusRequested(int32_t xtraStatusUpdated);
|
||||||
void startDgnssSource(const StartDgnssNtripParams& params);
|
void startDgnssSource(const StartDgnssNtripParams& params);
|
||||||
void restartDgnssSource();
|
void restartDgnssSource();
|
||||||
|
|
|
@ -26,4 +26,23 @@ PRODUCT_PACKAGES += android.hardware.gnss@2.1-impl-qti
|
||||||
PRODUCT_PACKAGES += android.hardware.gnss-aidl-impl-qti
|
PRODUCT_PACKAGES += android.hardware.gnss-aidl-impl-qti
|
||||||
PRODUCT_PACKAGES += android.hardware.gnss-aidl-service-qti
|
PRODUCT_PACKAGES += android.hardware.gnss-aidl-service-qti
|
||||||
|
|
||||||
|
## Feature flags - self contained FR in gps module
|
||||||
|
# Enable NHz location feature. Default is false.
|
||||||
|
# Set this flag to true to enable the NHz location feature.
|
||||||
|
FEATURE_LOCATION_NHZ := false
|
||||||
|
|
||||||
|
# Soong Namespace
|
||||||
|
SOONG_CONFIG_NAMESPACES += qtilocation
|
||||||
|
|
||||||
|
# Soong Keys
|
||||||
|
SOONG_CONFIG_qtilocation := feature_nhz
|
||||||
|
|
||||||
|
# Soong Values
|
||||||
|
SOONG_CONFIG_qtilocation_feature_nhz := false
|
||||||
|
|
||||||
|
# Enable NHz location feature
|
||||||
|
ifeq ($(FEATURE_LOCATION_NHZ),true)
|
||||||
|
SOONG_CONFIG_qtilocation_feature_nhz := true
|
||||||
|
endif
|
||||||
|
|
||||||
endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
|
endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
|
||||||
|
|
|
@ -349,12 +349,20 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||||
|
|
||||||
pthread_mutex_lock(&gDataMutex);
|
pthread_mutex_lock(&gDataMutex);
|
||||||
|
|
||||||
|
LocationCallbacks currentCallbacks = {};
|
||||||
|
auto it = gData.clientData.find(this);
|
||||||
|
if (it != gData.clientData.end()) {
|
||||||
|
currentCallbacks = gData.clientData[this];
|
||||||
|
}
|
||||||
|
|
||||||
if (isGnssClient(locationCallbacks)) {
|
if (isGnssClient(locationCallbacks)) {
|
||||||
loadLibGnss();
|
loadLibGnss();
|
||||||
if (NULL != gData.gnssInterface) {
|
if (NULL != gData.gnssInterface) {
|
||||||
// either adds new Client or updates existing Client
|
// either adds new Client or updates existing Client
|
||||||
gData.gnssInterface->addClient(this, locationCallbacks);
|
gData.gnssInterface->addClient(this, locationCallbacks);
|
||||||
}
|
}
|
||||||
|
} else if (NULL != gData.gnssInterface && isGnssClient(currentCallbacks)) {
|
||||||
|
gData.gnssInterface->removeClient(this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBatchingClient(locationCallbacks)) {
|
if (isBatchingClient(locationCallbacks)) {
|
||||||
|
@ -363,6 +371,8 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||||
// either adds new Client or updates existing Client
|
// either adds new Client or updates existing Client
|
||||||
gData.batchingInterface->addClient(this, locationCallbacks);
|
gData.batchingInterface->addClient(this, locationCallbacks);
|
||||||
}
|
}
|
||||||
|
} else if (NULL != gData.batchingInterface && isBatchingClient(currentCallbacks)) {
|
||||||
|
gData.batchingInterface->removeClient(this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isGeofenceClient(locationCallbacks)) {
|
if (isGeofenceClient(locationCallbacks)) {
|
||||||
|
@ -371,6 +381,8 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||||
// either adds new Client or updates existing Client
|
// either adds new Client or updates existing Client
|
||||||
gData.geofenceInterface->addClient(this, locationCallbacks);
|
gData.geofenceInterface->addClient(this, locationCallbacks);
|
||||||
}
|
}
|
||||||
|
} else if (NULL != gData.geofenceInterface && isGeofenceClient(currentCallbacks)) {
|
||||||
|
gData.geofenceInterface->removeClient(this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
gData.clientData[this] = locationCallbacks;
|
gData.clientData[this] = locationCallbacks;
|
||||||
|
|
|
@ -354,6 +354,8 @@ typedef enum {
|
||||||
LOCATION_CAPABILITIES_QWES_QDR3 = (1<<26),
|
LOCATION_CAPABILITIES_QWES_QDR3 = (1<<26),
|
||||||
// This mask indicates DGNSS license bundle is enabled.
|
// This mask indicates DGNSS license bundle is enabled.
|
||||||
LOCATION_CAPABILITIES_QWES_DGNSS = (1<<27),
|
LOCATION_CAPABILITIES_QWES_DGNSS = (1<<27),
|
||||||
|
// This mask indicates engine debug data enabled.
|
||||||
|
LOCATION_CAPABILITIES_ENGINE_DEBUG_DATA_BIT = (1<<28)
|
||||||
} LocationCapabilitiesBits;
|
} LocationCapabilitiesBits;
|
||||||
|
|
||||||
typedef uint8_t LocationQwesFeatureType;
|
typedef uint8_t LocationQwesFeatureType;
|
||||||
|
@ -881,7 +883,9 @@ typedef enum {
|
||||||
GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA = 17, /**< SBAS L1_CA RF Band */
|
GNSS_LOC_SIGNAL_TYPE_SBAS_L1_CA = 17, /**< SBAS L1_CA RF Band */
|
||||||
GNSS_LOC_SIGNAL_TYPE_NAVIC_L5 = 18, /**< NAVIC L5 RF Band */
|
GNSS_LOC_SIGNAL_TYPE_NAVIC_L5 = 18, /**< NAVIC L5 RF Band */
|
||||||
GNSS_LOC_SIGNAL_TYPE_BEIDOU_B2A_Q = 19, /**< BEIDOU B2A_Q RF Band */
|
GNSS_LOC_SIGNAL_TYPE_BEIDOU_B2A_Q = 19, /**< BEIDOU B2A_Q RF Band */
|
||||||
GNSS_LOC_MAX_NUMBER_OF_SIGNAL_TYPES = 20 /**< Maximum number of signal types */
|
GNSS_LOC_SIGNAL_TYPE_BEIDOU_B2B_I = 20, /**< BeiDou B2B_I RF band (data) */
|
||||||
|
GNSS_LOC_SIGNAL_TYPE_BEIDOU_B2B_Q = 21, /**< BeiDou B2B_Q RF band (Pilot)*/
|
||||||
|
GNSS_LOC_MAX_NUMBER_OF_SIGNAL_TYPES = 22 /**< Maximum number of signal types */
|
||||||
} Gnss_LocSignalEnumType;
|
} Gnss_LocSignalEnumType;
|
||||||
|
|
||||||
typedef uint32_t PositioningEngineMask;
|
typedef uint32_t PositioningEngineMask;
|
||||||
|
|
|
@ -26,6 +26,42 @@
|
||||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||||
|
|
||||||
|
Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted (subject to the limitations in the
|
||||||
|
disclaimer below) provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||||
|
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||||
|
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef GPS_EXTENDED_H
|
#ifndef GPS_EXTENDED_H
|
||||||
#define GPS_EXTENDED_H
|
#define GPS_EXTENDED_H
|
||||||
|
|
||||||
|
@ -39,6 +75,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -117,6 +154,336 @@ struct BackhaulContext {
|
||||||
uint16_t prefIpType;
|
uint16_t prefIpType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Engine Debug data Information */
|
||||||
|
|
||||||
|
#define GNSS_MAX_SV_INFO_LIST_SIZE 176
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int32_t jammerInd;
|
||||||
|
// Jammer Indication
|
||||||
|
int32_t agc;
|
||||||
|
// Automatic gain control
|
||||||
|
} GnssJammerData;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint16_t gnssSvId;
|
||||||
|
/**< GNSS SV ID. Range:
|
||||||
|
- GPS -- 1 to 32
|
||||||
|
- GLONASS -- 65 to 96
|
||||||
|
- SBAS -- 120 to 158 and 183 to 191
|
||||||
|
- QZSS -- 193 to 197
|
||||||
|
- BDS -- 201 to 263
|
||||||
|
- Galileo -- 301 to 336
|
||||||
|
- NavIC -- 401 to 414 */
|
||||||
|
|
||||||
|
uint8_t type;
|
||||||
|
/**< Navigation data type */
|
||||||
|
|
||||||
|
uint8_t src;
|
||||||
|
/**< Navigation data source.*/
|
||||||
|
int32_t age;
|
||||||
|
/**< Age of navigation data.
|
||||||
|
- Units: Seconds */
|
||||||
|
} GnssNavDataInfo;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t hours;
|
||||||
|
/**< Hours of timestamp */
|
||||||
|
|
||||||
|
uint32_t mins;
|
||||||
|
/**< Minutes of timestamp */
|
||||||
|
|
||||||
|
float secs;
|
||||||
|
/**< Seconds of timestamp */
|
||||||
|
} GnssTimeInfo;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
GPS_XTRA_VALID_BIT = 1 << 0,
|
||||||
|
GLONASS_XTRA_VALID_BIT = 1 << 1,
|
||||||
|
BDS_XTRA_VALID_BIT = 1 << 2,
|
||||||
|
GAL_XTRA_VALID_BIT = 1 << 3,
|
||||||
|
QZSS_XTRA_VALID_BIT = 1 << 4,
|
||||||
|
NAVIC_XTRA_VALID_BIT = 1 << 5
|
||||||
|
} GnssXtraValidMaskBits;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
uint8_t timeValid;
|
||||||
|
/**<Time validity >*/
|
||||||
|
|
||||||
|
uint16_t gpsWeek;
|
||||||
|
/**< Full GPS week */
|
||||||
|
|
||||||
|
uint32_t gpsTowMs;
|
||||||
|
/**< GPS time of week.
|
||||||
|
- Units: milliseconds */
|
||||||
|
|
||||||
|
uint8_t sourceOfTime;
|
||||||
|
/**< Source of the time information*/
|
||||||
|
|
||||||
|
float clkTimeUnc;
|
||||||
|
/**< Single-sided maximum time bias uncertainty.
|
||||||
|
- Units: milliseconds */
|
||||||
|
|
||||||
|
float clkFreqBias;
|
||||||
|
/**< Receiver clock frequency bias. \n
|
||||||
|
- Units -- ppb */
|
||||||
|
|
||||||
|
float clkFreqUnc;
|
||||||
|
/**< Receiver clock frequency uncertainty. \n
|
||||||
|
- Units -- ppb */
|
||||||
|
|
||||||
|
uint8_t xoState;
|
||||||
|
/**< XO calibration. */
|
||||||
|
|
||||||
|
uint32_t rcvrErrRecovery;
|
||||||
|
/**< Error recovery reason. */
|
||||||
|
|
||||||
|
Gnss_LeapSecondInfoStructType leapSecondInfo;
|
||||||
|
/**< Leap second information. */
|
||||||
|
|
||||||
|
std::vector<GnssJammerData> jammerData;
|
||||||
|
/**< Jammer indicator of each signal. */
|
||||||
|
|
||||||
|
uint64_t jammedSignalsMask;
|
||||||
|
/* Jammer Signal Mask */
|
||||||
|
|
||||||
|
GnssTimeInfo epiTime;
|
||||||
|
/**< UTC Time associated with EPI. */
|
||||||
|
|
||||||
|
uint8_t epiValidity;
|
||||||
|
/**< Epi validity >*/
|
||||||
|
|
||||||
|
float epiLat;
|
||||||
|
/**< EPI Latitude. - Units: Radians
|
||||||
|
valid if 0th bit set in epiValidity*/
|
||||||
|
|
||||||
|
float epiLon;
|
||||||
|
/**< EPI Longitude. - Units: Radians
|
||||||
|
valid if 0th bit set in epiValidity*/
|
||||||
|
|
||||||
|
float epiAlt;
|
||||||
|
/**< EPI Altitude. - Units: Meters
|
||||||
|
valid if 1st bit set in epiValidity*/
|
||||||
|
|
||||||
|
float epiHepe;
|
||||||
|
/**< EPI Horizontal Estimated Position Error.
|
||||||
|
- Units: Meters
|
||||||
|
valid if 0th bit set in epiValidity*/
|
||||||
|
|
||||||
|
float epiAltUnc;
|
||||||
|
/**< EPI Altitude Uncertainty.
|
||||||
|
- Units: Meters
|
||||||
|
valid if 1st bit set in epiValidity*/
|
||||||
|
|
||||||
|
uint8_t epiSrc;
|
||||||
|
/**< EPI Source
|
||||||
|
valid if 2nd bit set in epiValidity*/
|
||||||
|
|
||||||
|
GnssTimeInfo bestPosTime;
|
||||||
|
/**< UTC Time associated with Best Position. */
|
||||||
|
|
||||||
|
float bestPosLat;
|
||||||
|
/**< Best Position Latitude.
|
||||||
|
- Units: Radians */
|
||||||
|
|
||||||
|
float bestPosLon;
|
||||||
|
/**< Best Position Longitude.
|
||||||
|
- Units: Radians */
|
||||||
|
|
||||||
|
float bestPosAlt;
|
||||||
|
/**< Best Position Altitude.
|
||||||
|
- Units: Meters */
|
||||||
|
|
||||||
|
float bestPosHepe;
|
||||||
|
/**< Best Position Horizontal Estimated Position Error.
|
||||||
|
- Units: Meters */
|
||||||
|
|
||||||
|
float bestPosAltUnc;
|
||||||
|
/**< Best Position Altitude Uncertainty.
|
||||||
|
- Units: Meters */
|
||||||
|
|
||||||
|
GnssTimeInfo xtraInfoTime;
|
||||||
|
/**< UTC time when XTRA debug information was generated. */
|
||||||
|
|
||||||
|
uint8_t xtraValidMask;
|
||||||
|
/**<xtra valid mask>*/
|
||||||
|
|
||||||
|
uint32_t gpsXtraAge;
|
||||||
|
/**< Age of GPS XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t gloXtraAge;
|
||||||
|
/**< Age of GLONASS XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t bdsXtraAge;
|
||||||
|
/**< Age of BDS XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t galXtraAge;
|
||||||
|
/**< Age of GAL XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t qzssXtraAge;
|
||||||
|
/**< Age of QZSS XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t navicXtraAge;
|
||||||
|
/**< Age of NAVIC XTRA data.
|
||||||
|
- Units: Seconds */
|
||||||
|
|
||||||
|
uint32_t gpsXtraMask;
|
||||||
|
/**< Specifies the GPS SV mask.
|
||||||
|
- SV ID mapping: SV 1 maps to bit 0. */
|
||||||
|
|
||||||
|
uint32_t gloXtraMask;
|
||||||
|
/**< Specifies the GLONASS SV mask.
|
||||||
|
- SV ID mapping: SV 65 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t bdsXtraMask;
|
||||||
|
/**< Specifies the BDS SV mask.
|
||||||
|
- SV ID mapping: SV 201 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t galXtraMask;
|
||||||
|
/**< Specifies the Galileo SV mask.
|
||||||
|
- SV ID mapping: SV 301 maps to bit 0. */
|
||||||
|
|
||||||
|
uint8_t qzssXtraMask;
|
||||||
|
/**< Specifies the QZSS SV mask.
|
||||||
|
- SV ID mapping: SV 193 maps to bit 0 */
|
||||||
|
|
||||||
|
uint32_t navicXtraMask;
|
||||||
|
/**< Specifies the NAVIC SV mask.
|
||||||
|
- SV ID mapping: SV 401 maps to bits 0. */
|
||||||
|
|
||||||
|
GnssTimeInfo ephInfoTime;
|
||||||
|
/**< UTC time when ephemeris debug information was generated. */
|
||||||
|
|
||||||
|
uint32_t gpsEphMask;
|
||||||
|
/**< Specifies the GPS SV mask.
|
||||||
|
- SV ID mapping: SV 1 maps to bit 0. */
|
||||||
|
|
||||||
|
uint32_t gloEphMask;
|
||||||
|
/**< Specifies the GLONASS SV mask.
|
||||||
|
- SV ID mapping: SV 65 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t bdsEphMask;
|
||||||
|
/**< Specifies the BDS SV mask.
|
||||||
|
- SV ID mapping: SV 201 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t galEphMask;
|
||||||
|
/**< Specifies the Galileo SV mask.
|
||||||
|
- SV ID mapping: SV 301 maps to bit 0. */
|
||||||
|
|
||||||
|
uint8_t qzssEphMask;
|
||||||
|
/**< Specifies the QZSS SV mask.
|
||||||
|
- SV ID mapping: SV 193 maps to bit 0 */
|
||||||
|
|
||||||
|
uint32_t navicEphMask;
|
||||||
|
/**< Specifies the NAVIC SV mask.
|
||||||
|
- SV ID mapping: SV 401 maps to bits 0. */
|
||||||
|
|
||||||
|
GnssTimeInfo healthInfoTime;
|
||||||
|
/**< UTC time when SV health information was generated. */
|
||||||
|
|
||||||
|
uint32_t gpsHealthUnknownMask;
|
||||||
|
/**< Specifies the GPS SV mask.
|
||||||
|
- SV ID mapping: SV 1 maps to bit 0. */
|
||||||
|
|
||||||
|
uint32_t gloHealthUnknownMask;
|
||||||
|
/**< Specifies the GLONASS SV mask.
|
||||||
|
- SV ID mapping: SV 65 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t bdsHealthUnknownMask;
|
||||||
|
/**< Specifies the BDS SV mask.
|
||||||
|
- SV ID mapping: SV 201 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t galHealthUnknownMask;
|
||||||
|
/**< Specifies the Galileo SV mask.
|
||||||
|
- SV ID mapping: SV 301 maps to bit 0. */
|
||||||
|
|
||||||
|
uint8_t qzssHealthUnknownMask;
|
||||||
|
/**< Specifies the QZSS SV mask.
|
||||||
|
- SV ID mapping: SV 193 maps to bit 0 */
|
||||||
|
|
||||||
|
uint32_t navicHealthUnknownMask;
|
||||||
|
/**< Specifies the NAVIC SV mask.
|
||||||
|
- SV ID mapping: SV 401 maps to bits 0. */
|
||||||
|
|
||||||
|
uint32_t gpsHealthGoodMask;
|
||||||
|
/**< Specifies the GPS SV mask.
|
||||||
|
- SV ID mapping: SV 1 maps to bit 0. */
|
||||||
|
|
||||||
|
uint32_t gloHealthGoodMask;
|
||||||
|
/**< Specifies the GLONASS SV mask.
|
||||||
|
- SV ID mapping: SV 65 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t bdsHealthGoodMask;
|
||||||
|
/**< Specifies the BDS SV mask.
|
||||||
|
- SV ID mapping: SV 201 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t galHealthGoodMask;
|
||||||
|
/**< Specifies the Galileo SV mask.
|
||||||
|
- SV ID mapping: SV 301 maps to bit 0. */
|
||||||
|
|
||||||
|
uint8_t qzssHealthGoodMask;
|
||||||
|
/**< Specifies the QZSS SV mask.
|
||||||
|
- SV ID mapping: SV 193 maps to bit 0 */
|
||||||
|
|
||||||
|
uint32_t navicHealthGoodMask;
|
||||||
|
/**< Specifies the NAVIC SV mask.
|
||||||
|
- SV ID mapping: SV 401 maps to bits 0. */
|
||||||
|
|
||||||
|
uint32_t gpsHealthBadMask;
|
||||||
|
/**< Specifies the GPS SV mask.
|
||||||
|
- SV ID mapping: SV 1 maps to bit 0. */
|
||||||
|
|
||||||
|
uint32_t gloHealthBadMask;
|
||||||
|
/**< Specifies the GLONASS SV mask.
|
||||||
|
- SV ID mapping: SV 65 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t bdsHealthBadMask;
|
||||||
|
/**< Specifies the BDS SV mask.
|
||||||
|
- SV ID mapping: SV 201 maps to bit 0. */
|
||||||
|
|
||||||
|
uint64_t galHealthBadMask;
|
||||||
|
/**< Specifies the Galileo SV mask.
|
||||||
|
- SV ID mapping: SV 301 maps to bit 0. */
|
||||||
|
|
||||||
|
uint8_t qzssHealthBadMask;
|
||||||
|
/**< Specifies the QZSS SV mask.
|
||||||
|
- SV ID mapping: SV 193 maps to bit 0 */
|
||||||
|
|
||||||
|
uint32_t navicHealthBadMask;
|
||||||
|
/**< Specifies the NAVIC SV mask.
|
||||||
|
- SV ID mapping: SV 401 maps to bits 0. */
|
||||||
|
|
||||||
|
GnssTimeInfo fixInfoTime;
|
||||||
|
/**< UTC time when fix information was generated. */
|
||||||
|
|
||||||
|
uint32_t fixInfoMask;
|
||||||
|
/**< Fix Information Mask*/
|
||||||
|
|
||||||
|
GnssTimeInfo navDataTime;
|
||||||
|
/**< UTC time when navigation data was generated. */
|
||||||
|
|
||||||
|
GnssNavDataInfo navData[GNSS_MAX_SV_INFO_LIST_SIZE];
|
||||||
|
/**< Satellite navigation data. */
|
||||||
|
|
||||||
|
GnssTimeInfo fixStatusTime;
|
||||||
|
/**< UTC time when fix status was generated. */
|
||||||
|
|
||||||
|
uint32_t fixStatusMask;
|
||||||
|
/**< Fix Status Mask */
|
||||||
|
|
||||||
|
uint32_t fixHepeLimit;
|
||||||
|
/**< Session HEPE Limit.
|
||||||
|
- Units: Meters */
|
||||||
|
} GnssEngineDebugDataInfo;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
|
@ -183,7 +183,12 @@ typedef enum {
|
||||||
LOC_SUPPORTED_FEATURE_DSDA_CONFIGURATION,
|
LOC_SUPPORTED_FEATURE_DSDA_CONFIGURATION,
|
||||||
/**< Support the Multiple Attribution Apps(UTH clients Lock control) feature */
|
/**< Support the Multiple Attribution Apps(UTH clients Lock control) feature */
|
||||||
LOC_SUPPORTED_FEATURE_MULTIPLE_ATTRIBUTION_APPS,
|
LOC_SUPPORTED_FEATURE_MULTIPLE_ATTRIBUTION_APPS,
|
||||||
LOC_SUPPORTED_FEATURE_QMI_FLP_NLP_SOURCE, /**< Support the FLP, NLP Z-Source provider feature */
|
/**< Support the FLP, NLP Z-Source provider feature */
|
||||||
|
LOC_SUPPORTED_FEATURE_QMI_FLP_NLP_SOURCE,
|
||||||
|
/**< Support the feature to report engine debug data */
|
||||||
|
LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA,
|
||||||
|
/**< Support the feature to report feature update in QMI_LOC_EVENT_REPORT_IND */
|
||||||
|
LOC_SUPPORTED_FEATURE_DYNAMIC_FEATURE_STATUS
|
||||||
} loc_supported_feature_enum;
|
} loc_supported_feature_enum;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -1054,6 +1059,8 @@ enum loc_api_adapter_event_index {
|
||||||
LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT, // GNSS SV nHz measurement report
|
LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT, // GNSS SV nHz measurement report
|
||||||
LOC_API_ADAPTER_EVENT_REPORT_INFO, // Event report info
|
LOC_API_ADAPTER_EVENT_REPORT_INFO, // Event report info
|
||||||
LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT, // Latency information report
|
LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT, // Latency information report
|
||||||
|
LOC_API_ADAPTER_FEATURE_STATUS_UPDATE, // Dynamic feature status update
|
||||||
|
LOC_API_ADAPTER_ENGINE_DEBUG_DATA_REPORT, // Engine Debug data report
|
||||||
LOC_API_ADAPTER_EVENT_MAX
|
LOC_API_ADAPTER_EVENT_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1097,6 +1104,9 @@ enum loc_api_adapter_event_index {
|
||||||
#define LOC_API_ADAPTER_BIT_GNSS_NHZ_MEASUREMENT (1ULL<<LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT)
|
#define LOC_API_ADAPTER_BIT_GNSS_NHZ_MEASUREMENT (1ULL<<LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT)
|
||||||
#define LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO (1ULL<<LOC_API_ADAPTER_EVENT_REPORT_INFO)
|
#define LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO (1ULL<<LOC_API_ADAPTER_EVENT_REPORT_INFO)
|
||||||
#define LOC_API_ADAPTER_BIT_LATENCY_INFORMATION (1ULL<<LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT)
|
#define LOC_API_ADAPTER_BIT_LATENCY_INFORMATION (1ULL<<LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT)
|
||||||
|
#define LOC_API_ADAPTER_BIT_FEATURE_STATUS_UPDATE (1ULL<<LOC_API_ADAPTER_FEATURE_STATUS_UPDATE)
|
||||||
|
#define LOC_API_ADAPTER_BIT_ENGINE_DEBUG_DATA_REPORT (1ULL<<LOC_API_ADAPTER_ENGINE_DEBUG_DATA_REPORT)
|
||||||
|
|
||||||
|
|
||||||
typedef uint64_t LOC_API_ADAPTER_EVENT_MASK_T;
|
typedef uint64_t LOC_API_ADAPTER_EVENT_MASK_T;
|
||||||
|
|
||||||
|
|
|
@ -865,6 +865,7 @@ static void loc_nmea_generate_GSV(const GnssSvNotification &svNotify,
|
||||||
if ((sv_meta_p->svTypeMask & (1 << svNotify.gnssSvs[svNumber - 1].type)) &&
|
if ((sv_meta_p->svTypeMask & (1 << svNotify.gnssSvs[svNumber - 1].type)) &&
|
||||||
sv_meta_p->signalId == convert_signalType_to_signalId(signalType))
|
sv_meta_p->signalId == convert_signalType_to_signalId(signalType))
|
||||||
{
|
{
|
||||||
|
svIdOffset = sv_meta_p->svIdOffset;
|
||||||
if (GNSS_SV_TYPE_SBAS == svNotify.gnssSvs[svNumber - 1].type) {
|
if (GNSS_SV_TYPE_SBAS == svNotify.gnssSvs[svNumber - 1].type) {
|
||||||
svIdOffset = SBAS_SV_ID_OFFSET;
|
svIdOffset = SBAS_SV_ID_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue