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 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了