串行 GPS 作为车速表
我遇到过一种情况,我可能觉得有必要开发一个简单的 GPS 应用程序来充当速度计。 它是为老式 PDA 开发的,其 CPU (162MHz ARM) 和 RAM (4MB) 限制与串行 GPS 接收器通信。
这是一个可行的项目吗? 它不需要精确到比赛,但足够接近以遵守速度限制。
我从哪里开始了解 GPS 规格、通过串行获取数据等。
I've run into a situation where I may feel obligated to develop a simple GPS application to act as a speedometer. It'd be developed for an older PDA with CPU (162MHz ARM) and RAM (4MB) constraints talking to a serial GPS receiver.
Is this a feasible project? It doesn't need to be race-accurate, but close enough to obey speed limits.
Where do I start for GPS specs, getting the data over serial, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PDA 应有足够的资源来接收来自 GPS 的导航数据。 大多数 GPS 接收器都会输出标准 ASCII 格式的 NMEA 语句,如此处所述。 您可能最感兴趣的句子是 VTG 因为它包括地面速度公里。
您需要检查您的特定 GPS 接收器是否允许您选择它发送的 NMEA 语句。 有些只会发送 GGA 语句,这将为您提供纬度/经度/高度(通常称为 WGS-84 坐标)。 然后你必须自己做数学计算来计算出速度。 该算法将从 WGS-84 转换为地心地球固定 (ECEF) 坐标,然后采用差值来计算速度。 这比 GPS 为您完成的计算工作量要大得多,除非您添加某种过滤,否则容易产生噪音,并且可能由于连续读取中的位置错误而导致不准确。
您可能会问为什么 VTG 语句的错误会更好 - GPS 接收器能够使用 GPS 信号中的多普勒频移来估计速度,这比位置差异准确得多。 这里有一个很好的描述。
如果您的接收器不支持包含速度的 NMEA 语句,您可以检查它是否支持任何可能包含速度的二进制格式。
The PDA should have enough resources to receive the navigation data from the GPS. Most GPS receivers spit out a standard ASCII format call NMEA sentences, described here. The sentence you might be most interested in is VTG as it includes ground speed in kilometers.
You'll need to check if your particular GPS receiver allows you to select which NMEA sentence(s) it sends. Some will only send the GGA sentence, which would give you lat/long/altitude (commonly referred to as WGS-84 coordinates). Then you'd have to do math to figure out the velocity yourself. The algorithms would be converting from WGS-84 to earth-centered earth-fixed (ECEF) coordinates, then taking differences to calculate velocity. This is far more computationally intensive than have the GPS do it for you, prone to noise unless you add some kind of filtering, and probably inaccurate due to the position errors in successive reads.
You might ask why the VTG sentence would be any better in error - GPS receivers are capable of using the Doppler shift in the GPS signal to estimate velocity, which is far more accurate than differences of position. There's a good description here.
If your receiver doesn't support a NMEA sentence that includes velocity, you might check if it supports any binary formats which might include velocity.
Eric S. Raymond 写了一篇关于利用 GPS 进行黑客攻击的精彩文章(并且咆哮)。
Eric S. Raymond has written an excellent piece (and rant) about Hacking with GPS.