本文介绍了NMEA消息到Android位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与外部的GPS工作的,因为它们是更准确。我已经有蓝牙连接制定出来,但现在我被困在NMEA格式的邮件的泛滥。

I am working with an external GPS, since they are far more accurate. I already have the bluetooth connection worked out, but now I'm stuck in a flood of NMEA formatted messages.

好像,因为你可以得到NMEA出了内置GPS栈,必须有一种方式来获得给定的NMEA消息的位置。

It seems like, since you can get NMEA out of the built in GPS stack, that there must be a way to get a Location given a NMEA message.

我该如何去有关转换我的NMEA信息转化为有用的定位对象?

How do I go about converting my NMEA messages into useful Location objects?

推荐答案

NMEA是很容易解析。有多种类型的句子不同的东西。对于位置数据,这句话你需要的是推荐最小担心自己, $ GPRMC

NMEA is quite easy to parse. There are various types of sentences for different things. For location data, the sentence you need to concern yourself with is the "recommended minimum", $GPRMC.

从这里举例:

$GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68


  • 225446 (修复22时54分46秒UTC时间)

  • A (导航接收机警告A = OK,V =警告)

  • 4916.45,N (北纬49度16.45分北)

  • 12311.12,W (东经123度11.12分西)

  • 000.5 (地面航速,海里)

  • 054.7 (场造好,真)

  • 191194 (19修正1994年11月日)

  • 020.3,E (磁差20.3度东)

  • * 68 (强制校验)

    • 225446 (Time of fix 22:54:46 UTC)
    • A (Navigation receiver warning A = OK, V = warning)
    • 4916.45,N (Latitude 49 deg. 16.45 min North)
    • 12311.12,W (Longitude 123 deg. 11.12 min West)
    • 000.5 (Speed over ground, Knots)
    • 054.7 (Course Made Good, True)
    • 191194 (Date of fix 19 November 1994)
    • 020.3,E (Magnetic variation 20.3 deg East)
    • *68 (mandatory checksum)
    • 您可能也感兴趣,其中有卫星数据长着的位置(固定质量)稀释。

      You might be also interested in $GPGSA, which has satellite data long with dilution of position (quality of fix).

      如果没有可供分析NMEA没有内部类,你可以使用这些例子很容易自己做一个。不幸的是,我不是一个Android开发者,所以我不知道什么是内部类是提供给你。

      If there is no internal class available for parsing NMEA, you can use these examples to easily make one yourself. Unfortunately, I'm not an Android developer, so I don't know what internal classes are available to you.

      这篇关于NMEA消息到Android位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 06:54