推出您自己的 NMEA 解析器还是使用开源 GPS 解析器?

发布于 2024-07-14 16:39:05 字数 225 浏览 8 评论 0原文

我做了很多位置感知计算,通常会结合 GPS。 我有自己的小型简单 NMEA 解析器,它不执行任何特殊操作 - 只是将 GPS 特定句子转换为可用的数字、标志等。

然而,GPSD 和 Gypsy 等项目正在进行大量积极的开发。 如果 GPS 是一件简单的事情,那么这些项目早就完成了,只是进入了维护模式。

  • 他们知道/做了什么我不知道的事情,因此我的代码没有考虑到?

I do a lot of location aware computing, often incorporating GPS. I have my own little simple NMEA parser that doesn't do anything special - just transforms the GPS specific sentences into usable numbers, flags, and so forth.

However, there is a lot of active development done on projects such as GPSD and Gypsy. If GPS were a simple matter, the projects would have finished long ago and simply gone into maintenance mode.

  • What do they know/do that I don't know about, and therefore my code doesn't account for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鼻尖触碰 2024-07-21 16:39:05

来自 GPSD 负责人的优秀文章

  • NMEA 标准不提供完整的 TPV(时间,位置,速度)元组,带有错误,大地水准面和磁力变化等
  • 由于不同的值在不同的句子中,并且没有定义的顺序,因此您无法轻松知道哪个速度与哪个位置报告对应
  • 某些值没有完整给出(即,年份是更常见和可用的句子中的两位数)
  • 没有标准化的方法来确定供应商、型号、固件
  • 没有标准化的方法来更改设置(通信速度、报告的句子、每秒的样本等)
  • 不兼容的二进制协议用于高级使用和更快报告
  • 由于 USB 到串行桥和蓝牙到串行桥的有趣竞争条件,改变速度是一个非常棘手的问题

- Adam

From an excellent article by the GPSD lead:

  • NMEA standard doesn't provide a full TPV (time, position, velocity) tuple with error, geoid and magnetic variation, etc
  • Since different values are in different sentences, and there's no defined order you can't easily know which velocity goes with which position report
  • Some values are not given in full (ie, year is two digits on the more common and avilable sentences)
  • No standardized way to determine vendor, model, firmware
  • No standardized way to change settings (communications speed, sentences reported, samples per second, etc)
  • Incompatible binary protocols for advanced usage and faster reporting
  • Due to interesting race conditions for USB to serial bridges and bluetooth to serial bridges, changing the speed is a very tricky problem

-Adam

む无字情书 2024-07-21 16:39:05

我曾与NMEA合作过,我的经验是:

NMEA格式设计得不好。
可以直接访问 GPS 接收器的专业应用程序应避免 NMEA。 他们应该考虑 GPS 设备的特定二进制格式。

除了Adam Davis上面提到的主题之外:

  • 它没有定义如何处理无效属性:例如,如果车辆静止不动,特别是如果它自启动GPS接收器以来没有移动,则航向/航向属性无效; 大多数接收器将输出一个空属性“,,”。 但这是未定义的。
  • 时间字段:一些供应商在秒后使用小数部分。 如果允许的话,它没有完全指定(?); 有些设备可以这样做,有些则不能。 (进一步:GGA语句定义秒后两位数字,RMC语句使用整数秒)
  • RMC、GSV 等句子的顺序对于不同的接收者来说是不同的。
    这就导致了如何知道定位何时完成的问题。 要么检查新时间戳是否到达,然后您就知道该位置已完成,但就实时行为而言,您将失去一秒钟。 或者您了解您的接收者,并且知道哪一个是修复的最后一句话。 或者你做一些“人工智能”来分析前十秒的顺序,然后你就知道哪个是最后一个。

您可以查看 SIRF 和 UBLOX 协议规范,看看他们有哪些大章节来描述他们如何解释 NMEA 协议。

如果有人知道用 java 或 Objective-C 编写的非常好的 NMEA 解析器/编写器,它是开源的并且不受 GPL 许可,请告诉我。

I have worked with NMEA, my experience is:

The NMEA format is not well designed.
Professional applications, that have direct access to the GPS receiver, should avoid NMEA. They should consider the specific binary format of the GPS device.

In addition to the topics mentioned by Adam Davis above:

  • Its not defined how to deal with invalid attributes: e.g. If the vehicle is standing still, especially, if it has not moved since starting the GPS receiver, the course/heading attribute is invalid; Most receivers will output an empty attribute ",,". But this is undefined.
  • The time field: Some vendors use a fractional part after the second. Its not exactly specified(?) if that is allowed, or not; some devices do that, others not. (Further: the GGA sentence defines two digits after the second, the RMC sentence use integral seconds)
  • The order of the RMC, GSV, etc. sentences are different from one receiver to the other.
    That leads to the problem to know when a position fix is complete. Either you check that a new time stamp arrived, then you know that the position is complete, but then you will loose one second, in terms of real time behavior. Or you know your receiver, and know which is the last sentence of a fix. Or you do some "artificial intelligence" to analyze the order in the first ten seconds, and then you know which is the last.

You can look in the SIRF and UBLOX protocol specification, and see what huge chapters they have, to describe how they interprete the NMEA protocol.

If somebody knows a really good NMEA parser / writer written in java or Objective-C, that is open source and not under the GPL license, please let me know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文