mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 10:02:06 +08:00
Gather quectel GPS data (#25300)
* bump cereal * Use old name * back to default old-commit-hash: 98146f5858241fedfe2b16c26afc20396665f884
This commit is contained in:
+1
-1
Submodule cereal updated: 9ae66d0712...5fce93da72
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user