duanqia9034 2016-04-03 07:28
浏览 89
已采纳

转换从GPS跟踪器接收的Lat和Long值

I have created an application that will listen to a particular port in which a GPS tracker will send data to it.

There's not much support received from the company(Chinese) whom I bought the GPS tracker, for development purpose. So it's kind of tougher to grasp everything myself.

I was able to figure out most of the data that was sent from the GPS tracker. The only thing is, the location coordinates sent from the tracker is in some specific format which I think it needs to be converted.

It's something like this:

1234N07700
7689E000

(the above values are just sample)

So am having trouble in converting it to actual Lat & Long values. I tried searching in Google, but couldn't find any examples based on this. Maybe my search terms where wrong!

Atleast if the name of the format used to represent this coordinates is known, I would be able to do further research.

Any ideas? Thank you.


EDIT

Example of a full string received from the gps tracker: enter image description here

  • 写回答

1条回答 默认 最新

  • dongnan1899 2016-04-03 11:02
    关注

    Check this website: http://www.sunearthtools.com/dp/tools/conversion.php

    You will be able to see this format:

    GPS: ddmm.mmmm[N,S]ddmm.mmmm[E,W] (Dec Min)
    

    So I guess the location coordinate values starts right after the A in your screenshot and all the way till the E.

    Based on your screenshot, the location would be 0829.1234N07700.5678E

    Now for the latitude calculation part,

    Consider 0829.1234N,
    Take first two digits, and then divide the rest of the digits by 60 and add them together.
    ie, Latitude = 08 + 29.1234/60 = 8.48539
    

    If the last character was S instead of N, put negative sign to the result.

    Now for the longitude calculation part,

    Consider 07700.5678E,
    Take first three digits, and then divide the rest of the digits by 60 and add them together.
    ie, Longitude = 077 + 00.5678/60 = 77.009463
    

    If the last character was W instead of E, put negative sign to the result.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏