- (CLLocationCoordinate2D)hhTrans_GCGPS:(CLLocationCoordinate2D)baiduGps

{

const double x_pi = 3.14159265358979324 * 3000.0 / 180.0;

CLLocationCoordinate2D googleGps;

double bd_x=baiduGps.longitude - 0.0065;

double bd_y=baiduGps.latitude - 0.006;

double z = sqrt(bd_x * bd_x + bd_y * bd_y) - 0.00002 * sin(bd_y * x_pi);

double theta = atan2(bd_y, bd_x) - 0.000003 * cos(bd_x * x_pi);

googleGps.longitude = z * cos(theta);

googleGps.latitude = z * sin(theta);

return googleGps;

}

iOS开发 百度坐标转火星坐标的更多相关文章

  1. ios 百度地图,火星坐标,地球坐标互转

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...

  2. 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换(JS版代码)

    /** * Created by Wandergis on 2015/7/8. * 提供了百度坐标(BD09).国测局坐标(火星坐标,GCJ02).和WGS84坐标系之间的转换 */ //定义一些常量 ...

  3. 百度坐标(BD-09)、国测局坐标(火星坐标,GCJ-02)和WGS-84坐标互转

    // 坐标转换 var coordTransform = (function () { // 一些常量 var PI = 3.1415926535897932384626; var X_PI = 3. ...

  4. iOS开发 百度坐标点的计算

    BMKMapPoint point1 = BMKMapPointForCoordinate(_userGps); BMKMapPoint point2 = BMKMapPointForCoordina ...

  5. iOS开发---百度地图配置流程,2.6.0 版本 支持64位

      1.首先需要在百度地图下载最新SDK:地址: http://developer.baidu.com/map/index.php?title=iossdk/sdkiosdev-download 2. ...

  6. iOS开发——百度云推送

    由于公司项目是集成的极光推送,详见下一篇博客. 集成百度推送大体相当,最好都参考官方文档集成,官方文档或官方网站教程是最好的博客. 百度Push服务SDK用户手册(iOS版) http://push. ...

  7. iOS开发——百度地图SDK集成

    (正在形成文档,待更新……)

  8. iOS 火星坐标相关整理及解决方案汇总(转)

    这几天在处理定位相关的代码,彻彻底底的被火星坐标恶心到了. 恶心列表 从 CLLocationManager 取出来的经纬度放到 mapView 上显示,是错的! 从 CLLocationManage ...

  9. WGS84、Web墨卡托、火星坐标、百度坐标互转

    转自:1.http://blog.csdn.net/wildboy2001/article/details/12031351 2.http://kongxz.com/2013/10/wgs-cgj/ ...

随机推荐

  1. Linux modules install

    安装模块的时候出现错误:modprobe: chdir(3.0.35-g6774ed9-dirty): No such file or directory. 内核模块没有安装正确.本文记录解决方法. ...

  2. mongodb sharding配置

    mongodb集群配置 1 Mongo使用sharding集群 mongodb副本集群 mongos1 192.168.20.137 mongos2 192.168.20.138 mongo_conf ...

  3. lua 环境揭秘

    什么是环境? http://www.lua.org/manual/5.1/manual.html#2.9 Besides metatables, objects of types thread, fu ...

  4. 帝国CMS内容模板IF判断

    [e:loop={'selfinfo',50,0,0,"jingshu=$navinfor[jingshu]","id"}]<?php$class1=&q ...

  5. ios--时间格式化(cell业务逻辑处理)

    一.点击更多按钮 1.项目需求      点击更多按钮,从底部弹出一个框  2.怎么从底部弹出一个框?           两种方法:                 一种用 UIActionShee ...

  6. linux挂载移动硬盘

    1. 安装ntfs-3g2. mkdir /mnt/disk3. mount -t ntfs-3g /dev/sdb /mnt/disk4.卸载 umount /dev/sdb

  7. Webstorm的序列号和证书

    User Name: ------------name-------------- EMBRACE -------------name-------------- License Key: ===== ...

  8. C++之路进阶——codevs2439(降雨量)

    2439 降雨量 2007年省队选拔赛四川  时间限制: 1 s  空间限制: 64000 KB  题目等级 : 大师 Master       题目描述 Description 我们常常会说这样的话 ...

  9. Qt之qt4.7 和qt 4.8.4 交叉实践

    开发机环境搭建: 测试环境:CentOs7.1  Ubuntu 12.0.4 操作流程: 一.编译Qt4.7.0 1)CentOS上实践 1.tar xzvf qt-everywhere-openso ...

  10. IIS7的集成模式下如何让自定义的HttpModule不处理静态文件(.html .css .js .jpeg等)请求

    今天将开发好的ASP.NET站点部署到客户的服务器上后,发现了一个非常头疼的问题,那么就是IIS7的应用程序池是集成模式的话,ASP.NET项目中自定义的HttpModule会处理静态文件(.html ...