gpsd 使用什么格式供餐?

问题描述

我需要重放 gpsd 收集的 gps 数据进行测试。我知道我可以通过 tcp 馈送 gpsd,例如:gpsd -N tcp://127.0.0.1:6000,但是我找不到正确的馈送格式。我应该使用什么格式?

解决方法

如果要重放 GPS 数据进行测试,可以使用 gpsd 套件中的 gpsfake 工具:https://gpsd.gitlab.io/gpsd/gpsfake.html

关于它可以使用的日志格式

Logfiles for the use with gpsfake can be retrieved using gpspipe,gpscat,or cgps from the gpsd distribution,or any other application which is able to create a compatible output.

所以我会记录来自真实 GNSS 接收器的日志

gpspipe -R > gps.log

然后在没有 GNSS 接收器的情况下使用 gpsfake 在测试期间重放它。

编辑:如果接收器输出 NMEA 消息,gpspipe -R 命令将保存 NMEA 日志。它可以稍后用于使用 gpsfake 或其他工具进行测试。当然也可以杀gpsd直接监听串口记录NMEA。