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.

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

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?