资源简介
自己写了一个MATLAB的demo,关于地图之间的gps坐标转换,以及计算gps坐标之间的距离(单位:m)。
代码片段和文件信息
function Demo()
%%************************************************
% * 各地图API坐标系统比较与转换;
% * WGS84坐标系:即地球坐标系,国际上通用的坐标系。设备一般包含GPS芯片或者北斗芯片获取的经纬度为WGS84地理坐标系
% * 谷歌地图采用的是WGS84地理坐标系(中国范围除外);
% * GCJ02坐标系:即火星坐标系,是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系。
% * 谷歌中国地图和搜搜中国地图采用的是GCJ02地理坐标系; BD09坐标系:即百度坐标系,GCJ02坐标系经加密后的坐标系;
% * 搜狗坐标系、图吧坐标系等,估计也是在GCJ02基础上加密而成的。
%*************************************************
addpath(‘GPS_transform_function‘);
setGlobalParam();
bd(1) = setGps(45.8108590000 126.5765000000); ggE(1) = setGps(45.8028260974 126.5641109061);
bd(2) = setGps(41.0792410000 122.9949010000); ggE(2) = setGps(41.0711162783 122.9830377155);
bd(3) = setGps(39.8639260000 116.4454630000); ggE(3) = setGps(39.8568077220 116.4326631621);
bd(4) = setGps(37.3378270000 118.0092330000); ggE(4) = setGps(37.3313668670 117.9966449073);
bd(5) = setGps(34.3729180000108.9669620000); ggE(5) = setGps(34.3680907144108.9558248760);
bd(6) = setGps(38.9992240000106.4747440000); ggE(6) = setGps(38.9923508756106.4636167037);
bd(7) = setGps(32.901668000097.0001360000); ggE(7) = setGps(32.897920563896.9932480868);
bd(8) = setGps(31.8399500000112.1779060000); ggE(8) = setGps(31.8358276827112.1654442402);
bd(9) = setGps(30.1281310000120.3463060000); ggE(9) = setGps(30.1242164367120.3353189520);
bd(10) = setGps(19.8524130000110.3381760000); ggE(10) = setGps(19.8486216163110.3272439422);
bd(11) = setGps(28.8079810000119.0217010000); ggE(11) = setGps(28.8049078713119.0102085889);
bd(12) = setGps(23.6668270000100.1409000000); ggE(12) = setGps(23.6636272455100.1330879498);
bd(13) = setGps(36.7240980000121.0821980000); ggE(13) = setGps(36.7172051514121.0706913120);
bd(14) = setGps(27.4050490000113.7968680000); ggE(14) = setGps(27.4024433135113.7848728153);
bd(15) = setGps(22.2014900000114.2384030000); ggE(15) = setGps(22.1979598293114.2271436423);
bd(16) = setGps(33.4894640000100.6979930000); ggE(16) = setGps(33.4850650605100.6902055035);
bd(17) = setGps(34.0732600000115.6365980000); ggE(17) = setGps(34.0690409021115.6245999376);
bd(18) = setGps(32.8395630000116.0781330000); ggE(18) = setGps(32.8354503120116.0660828789);
bd(19) = setGps(36.990219000079.7618690000); ggE(19) = setGps(36.984653797979.7530792325);
bd(20) = setGps(34.6530240000113.8704570000); ggE(20) = setGps(34.6479536364113.8581821943);
%
% % bd(1) = setGps(30.276962 120.108316); ggE(1) = setGps(45.8028260974 126.5641109061);
for i = 1 :numel(bd)
bd2ggE = bd09_To_Gps84(bd(i).Lat bd(i).Lon);
dist(i)= GPSDist(bd2ggE.Lat bd2ggE.Lon ggE(i).Lat ggE(i).Lon)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3606 2017-05-29 16:09 GPS_transform\Demo.m
....... 502 2016-12-28 16:46 GPS_transform\GPS_transform_function\bd09_To_Gcj02.m
....... 185 2016-12-28 16:46 GPS_transform\GPS_transform_function\bd09_To_Gps84.m
....... 490 2016-12-28 16:46 GPS_transform\GPS_transform_function\gcj02_To_Bd09.m
....... 269 2016-12-28 16:46 GPS_transform\GPS_transform_function\gcj_To_Gps84.m
....... 828 2016-12-28 16:45 GPS_transform\GPS_transform_function\gps84_To_Gcj02.m
....... 373 2016-12-28 16:47 GPS_transform\GPS_transform_function\GPSDist.m
....... 205 2016-12-28 16:46 GPS_transform\GPS_transform_function\outOfChina.m
....... 265 2016-12-28 16:49 GPS_transform\GPS_transform_function\setGlobalParam.m
....... 73 2016-12-28 16:46 GPS_transform\GPS_transform_function\setGps.m
....... 711 2016-12-28 16:47 GPS_transform\GPS_transform_function\transform.m
....... 385 2016-12-28 16:47 GPS_transform\GPS_transform_function\transformLat.m
....... 367 2016-12-28 16:47 GPS_transform\GPS_transform_function\transformLon.m
目录 0 2016-12-28 16:49 GPS_transform\GPS_transform_function
目录 0 2016-12-28 16:50 GPS_transform
----------- --------- ---------- ----- ----
8259 15
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论