From 98146f5858241fedfe2b16c26afc20396665f884 Mon Sep 17 00:00:00 2001 From: HaraldSchafer Date: Thu, 28 Jul 2022 01:35:37 +0200 Subject: [PATCH] Gather quectel GPS data (#25300) * bump cereal * Use old name * back to default --- cereal | 2 +- selfdrive/sensord/rawgps/rawgpsd.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cereal b/cereal index 9ae66d0712..5fce93da72 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 9ae66d07129dcf1b5d6fc5167bbc89691a56d24c +Subproject commit 5fce93da72fbd7cebd025ebdc58fa3ef3b4a3fd5 diff --git a/selfdrive/sensord/rawgps/rawgpsd.py b/selfdrive/sensord/rawgps/rawgpsd.py index 3aa6d4b072..14f0fe3878 100755 --- a/selfdrive/sensord/rawgps/rawgpsd.py +++ b/selfdrive/sensord/rawgps/rawgpsd.py @@ -81,10 +81,9 @@ def main() -> NoReturn: LOG_GNSS_OEMDRE_MEASUREMENT_REPORT, ] pub_types = ['qcomGnss'] - if int(os.getenv("PUBLISH_EXTERNAL", "0")) == 1: - unpack_position, _ = dict_unpacker(position_report) - log_types.append(LOG_GNSS_POSITION_REPORT) - pub_types.append("gpsLocationExternal") + unpack_position, _ = dict_unpacker(position_report) + log_types.append(LOG_GNSS_POSITION_REPORT) + pub_types.append("gpsLocation") # connect to modem diag = ModemDiag() @@ -204,8 +203,8 @@ def main() -> NoReturn: vNED = [report["q_FltVelEnuMps[1]"], report["q_FltVelEnuMps[0]"], -report["q_FltVelEnuMps[2]"]] vNEDsigma = [report["q_FltVelSigmaMps[1]"], report["q_FltVelSigmaMps[0]"], -report["q_FltVelSigmaMps[2]"]] - msg = messaging.new_message('gpsLocationExternal') - gps = msg.gpsLocationExternal + msg = messaging.new_message('gpsLocation') + gps = msg.gpsLocation gps.flags = 1 gps.latitude = report["t_DblFinalPosLatLon[0]"] * 180/math.pi gps.longitude = report["t_DblFinalPosLatLon[1]"] * 180/math.pi @@ -220,7 +219,7 @@ def main() -> NoReturn: gps.bearingAccuracyDeg = report["q_FltHeadingUncRad"] * 180/math.pi gps.speedAccuracy = math.sqrt(sum([x**2 for x in vNEDsigma])) - pm.send('gpsLocationExternal', msg) + pm.send('gpsLocation', msg) if log_type in [LOG_GNSS_GPS_MEASUREMENT_REPORT, LOG_GNSS_GLONASS_MEASUREMENT_REPORT]: msg = messaging.new_message('qcomGnss')