1. <legend id='heTys'><style id='heTys'><dir id='heTys'><q id='heTys'></q></dir></style></legend>

      <small id='heTys'></small><noframes id='heTys'>

        <bdo id='heTys'></bdo><ul id='heTys'></ul>

      <tfoot id='heTys'></tfoot>

      1. <i id='heTys'><tr id='heTys'><dt id='heTys'><q id='heTys'><span id='heTys'><b id='heTys'><form id='heTys'><ins id='heTys'></ins><ul id='heTys'></ul><sub id='heTys'></sub></form><legend id='heTys'></legend><bdo id='heTys'><pre id='heTys'><center id='heTys'></center></pre></bdo></b><th id='heTys'></th></span></q></dt></tr></i><div id='heTys'><tfoot id='heTys'></tfoot><dl id='heTys'><fieldset id='heTys'></fieldset></dl></div>

        以度为单位的 GPS 坐标以计算距离

        时间:2023-10-03
        • <small id='PAkLN'></small><noframes id='PAkLN'>

            <i id='PAkLN'><tr id='PAkLN'><dt id='PAkLN'><q id='PAkLN'><span id='PAkLN'><b id='PAkLN'><form id='PAkLN'><ins id='PAkLN'></ins><ul id='PAkLN'></ul><sub id='PAkLN'></sub></form><legend id='PAkLN'></legend><bdo id='PAkLN'><pre id='PAkLN'><center id='PAkLN'></center></pre></bdo></b><th id='PAkLN'></th></span></q></dt></tr></i><div id='PAkLN'><tfoot id='PAkLN'></tfoot><dl id='PAkLN'><fieldset id='PAkLN'></fieldset></dl></div>
              <tbody id='PAkLN'></tbody>
              <bdo id='PAkLN'></bdo><ul id='PAkLN'></ul>

              1. <tfoot id='PAkLN'></tfoot>
                  <legend id='PAkLN'><style id='PAkLN'><dir id='PAkLN'><q id='PAkLN'></q></dir></style></legend>
                  本文介绍了以度为单位的 GPS 坐标以计算距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 iPhone 上,我以十进制度数获取用户的位置,例如:纬度 39.470920 和经度 = -0.373192;这就是A点.

                  On the iPhone, I get the user's location in decimal degrees, for example: latitude 39.470920 and longitude = -0.373192; That's point A.

                  我需要用另一个 GPS 坐标创建一条线,也以十进制度为单位,点 B.然后,计算从 A 到 B 的线与另一个点 C 之间的距离(垂直).

                  I need to create a line with another GPS coordinate, also in decimal degrees, point B. Then, calculate the distance (perpendicular) between the line from A to B and another point C.

                  问题是我对度数的值感到困惑.我想要以米为单位的结果.需要什么转换?计算这个的最终公式会是什么样子?

                  The problem is I get confused with the values in degrees. I would like to have the result in meters. What's the conversion needed? How will the final formula to compute this look like?

                  推荐答案

                  你为什么不用CLLocation 的 distanceFromLocation: 方法?它会告诉您接收器与另一个 CLLocation 之间的精确距离.

                  Why don't you use CLLocations distanceFromLocation: method? It will tell you the precise distance between the receiver and another CLLocation.

                  CLLocation *locationA = [[CLLocation alloc] initWithLatitude:12.123456 longitude:12.123456];
                  CLLocation *locationB = [[CLLocation alloc] initWithLatitude:21.654321 longitude:21.654321];
                  
                  CLLocationDistance distanceInMeters = [locationA distanceFromLocation:locationB];
                  
                  // CLLocation is aka double
                  
                  [locationA release];
                  [locationB release];
                  

                  就这么简单.

                  这篇关于以度为单位的 GPS 坐标以计算距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Xcode IPHONE 中的引导服务器错误 下一篇:如何从 NSMutableArray 中删除 [NSNull Null] 对象?

                  相关文章

                    <bdo id='eNobs'></bdo><ul id='eNobs'></ul>
                    <tfoot id='eNobs'></tfoot>
                    <i id='eNobs'><tr id='eNobs'><dt id='eNobs'><q id='eNobs'><span id='eNobs'><b id='eNobs'><form id='eNobs'><ins id='eNobs'></ins><ul id='eNobs'></ul><sub id='eNobs'></sub></form><legend id='eNobs'></legend><bdo id='eNobs'><pre id='eNobs'><center id='eNobs'></center></pre></bdo></b><th id='eNobs'></th></span></q></dt></tr></i><div id='eNobs'><tfoot id='eNobs'></tfoot><dl id='eNobs'><fieldset id='eNobs'></fieldset></dl></div>
                  1. <legend id='eNobs'><style id='eNobs'><dir id='eNobs'><q id='eNobs'></q></dir></style></legend>

                    <small id='eNobs'></small><noframes id='eNobs'>