当前位置:网站首页>Longitude and latitude and its transformation with coordinate system
Longitude and latitude and its transformation with coordinate system
2022-07-25 23:01:00 【kissgoodbye2012】
One 、 The concept of longitude and latitude (longitude and latitude)
Longitude and latitude yes longitude And latitude The joint name of , Form a Coordinate system , be called Geographic coordinate system , It's a use of Three dimensional space Of sphere Come on Define space on earth Of Spherical coordinate system , Can mark any position on the earth .

1.1 longitude
longitude It refers to passing through a place Longitude plane And prime meridian plane As a result Dihedral . stay East of the prime meridian The longitude of is called East longitude , West of the prime meridian Call The west longitude . Dongjingyong “E” Express , Western Classics “W” Express .
stay 1884 year Of International primary meridian Conference On Greenwich Of Meridian By Officially set as the starting point of longitude . East longitude 180° That is, the Western Scripture 180°, About equal to International Day exchange line , On both sides of the international day exchange line , The date differs by one day .
Positive east longitude , The west longitude is negative .
1.2 latitude
latitude It refers to making normal , This point normal And Equatorial plane Of Line surface angle , Its value is in 0 to 90 Between degrees . The latitude of the point north of the equator is called north latitude , Write it down as N; The latitude of the point south of the equator is called south latitude , Write it down as S.
North latitude by Positive numbers , South latitude by negative .
1.3 Basic order of magnitude
Every difference in longitude and latitude 1 degree , The distance is about 111km;
Every difference in longitude and latitude 1 branch , The distance is about 1.85km;
Every difference in longitude and latitude 1 second , The distance is about 0.031km;
1.4 How to generate longitude and latitude from satellite triangulation ?
reference :
[1] Zhang Cuifang . GPS Design and verification of satellite positioning algorithm [D]. University of electronic technology , 2011.
[2]Bancroft, S. An Algebraic Solution of the GPS Equations[J]. IEEE Transactions on Aerospace & Electronic Systems, 1985, AES-21(1):56-59.
GPS The position of the satellite is measured by the ground monitoring station and then compiled into a message and injected into the satellite , Then the satellite releases the broadcast ephemeris . For users , The position of the satellite is calculated according to the navigation message of the satellite broadcast .
step 1: adopt GPS Satellite ephemeris solution satellite in the geocentric earth fixed coordinate system (WGS-84 Coordinate system ) Position in ;
step 2: adopt GPS The satellite ephemeris calculates the satellite speed ;
step 3: The least square method calculates the position of the receiver in the geocentric earth fixed coordinate system (WGS-84 Coordinate system ) Middle position ;
step 4: Calculate the speed of the receiver ;
step 5: Convert to latitude and longitude .
Two 、 Common geographic coordinate systems
2.1 WGS-84 Coordinate system
WGS-84 Coordinate system _EagleLY5894 The blog of -CSDN Blog _wgs84 Coordinate system
WGS-84 Coordinate system (World Geodetic System One 1984 Coordinate System) It is a kind of established by the U.S. Department of defense Geocentric geostationary coordinate system , Global positioning system GPS Is based on WGS-84 In coordinate system .
WGS-84 Coordinate system The origin is the center of mass of the earth , Of space rectangular coordinate system Z Axis pointing BIH(1984.0) Defined Earth pole (CTP) Direction , The origin of international agreements CIO, It consists of IAU and IUGG Joint recommendation .X Axis pointing BIH Defined Zero meridian and CTP The intersection of the equator ,Y Axis and Z、X Shaft composition Right hand coordinate system .

WGS-84 The earth model established is a Standard ellipsoid .

among : The semi major axis of the earth :a ≡ 6378137.0 m ; The earth's short half axis :b = 6356752 m .
3、 ... and 、 Code : Latitude and longitude WGS-84 Coordinate system conversion (c++ Language version )
/**
* WGS84 Rotating geocentric coordinate system
* Longitude and latitude units : degree ; Height unit : rice
**/
public static double[] WGS84toECEF(double latitude, double longitude, double height) {
double X;
double Y;
double Z;
double a = 6378137.0;% Company m
double b = 6356752.31424518;% Company m
double E = (a * a - b * b) / (a * a);
double COSLAT = Math.cos(latitude * Math.PI / 180);
double SINLAT = Math.sin(latitude * Math.PI / 180);
double COSLONG = Math.cos(longitude * Math.PI / 180);
double SINLONG = Math.sin(longitude * Math.PI / 180);
double N = a / (Math.sqrt(1 - E * SINLAT * SINLAT));
double NH = N + height;
X = NH * COSLAT * COSLONG;
Y = NH * COSLAT * SINLONG;
Z = (b * b * N / (a * a) + height) * SINLAT;
return new double[] { X, Y, Z };
}
/**
* The geocentric coordinate system turns WGS84
*/
public static String ECEFtoWGS84(double x, double y, double z){
double a, b, c, d;
double Longitude;// longitude
double Latitude;// latitude
double Altitude;// Altitude
double p, q;
double N;
a = 6378137.0;
b = 6356752.31424518;
c = Math.sqrt(((a * a) - (b * b)) / (a * a));
d = Math.sqrt(((a * a) - (b * b)) / (b * b));
p = Math.sqrt((x * x) + (y * y));
q = Math.atan2((z * a), (p * b));
Longitude = Math.atan2(y, x);
Latitude = Math.atan2((z + (d * d) * b * Math.pow(Math.sin(q), 3)),
(p - (c * c) * a * Math.pow(Math.cos(q), 3)));
N = a / Math.sqrt(1 - ((c * c) * Math.pow(Math.sin(Latitude), 2)));
Altitude = (p / Math.cos(Latitude)) - N;
Longitude = Longitude * 180.0 / Math.PI;
Latitude = Latitude * 180.0 / Math.PI;
return Longitude + "," + Latitude + "," + Altitude;
}
Four 、 Code : Latitude and longitude WGS-84 Coordinate system conversion (Matlab Language version )
%% Latitude and longitude WGS84 Rectangular coordinate system
% Positive east longitude , The west longitude is negative
% North latitude is positive , The south latitude is negative
% Input parameters 1: latitude ; Input parameters 2: longitude ; Input parameters 3: Height
% Longitude and latitude units : degree ; Height unit : rice
function [x,y,z]=LL2WGS84(latitude,longitude,height)
a = 6378137.0;% Company m
b = 6356752.31424518;% Company m
E = (a * a - b * b) / (a * a);
COSLAT = cos(latitude * pi / 180);
SINLAT = sin(latitude * pi / 180);
COSLONG = cos(longitude * pi / 180);
SINLONG = sin(longitude * pi / 180);
N = a / (sqrt(1 - E * SINLAT * SINLAT));
NH = N + height;
x = NH * COSLAT * COSLONG;
y = NH * COSLAT * SINLONG;
z = (b * b * N / (a * a) + height) * SINLAT;
end%% WGS84 Rectangular coordinate system turns longitude and latitude
% Positive east longitude , The west longitude is negative
% North latitude is positive , The south latitude is negative
% Input parameters 1: latitude ; Input parameters 2: longitude ; Input parameters 3: Height
% Longitude and latitude units : degree ; Height unit : rice
function [latitude,longitude,height]=WGS842LL(x,y,z)
a = 6378137.0;
b = 6356752.31424518;
c = sqrt(((a * a) - (b * b)) / (a * a));
d = sqrt(((a * a) - (b * b)) / (b * b));
p = sqrt((x * x) + (y * y));
q = atan((z * a)/ (p * b));
longitude = atan(y/x);
latitude = atan((z + (d * d) * b * sin(q)^3)/(p - (c * c) * a * cos(q)^3));
N = a / sqrt(1 - ((c * c) * sin(latitude)^2));
height = (p / cos(latitude)) - N;
longitude = longitude * 180.0 / pi;
latitude = latitude * 180.0 / pi;
end
边栏推荐
- uvm_hdl——DPI在UVM中的实现(四)
- 驱动板网线直连电脑共享网络配置
- 【自然语言处理】【向量表示】AugSBERT:改善用于成对句子评分任务的Bi-Encoders的数据增强方法
- Tree view model example of QT
- Code shoe set precision barrage
- invalid syntax
- Qtreewidget control of QT
- 7-1 understand everything
- Ip--- ia review
- Kibana~ the process number cannot be found after kibana is started in the background
猜你喜欢

Mocha test

recyclerview计算滑动距离之computeHorizontalScrollExtent-computeHorizontalScrollRange-computeHorizontalScrol

IPFs of Internet Protocol

AI首席架构师12-AICA-工业生产过程优化场景下产业落地解析

MathType安装和解决不能Crtl+V的问题

向下扎根,向上生长,探寻华为云AI的“根”力量

【自然语言处理】【向量表示】AugSBERT:改善用于成对句子评分任务的Bi-Encoders的数据增强方法

Session and cookie, token and storage

CUDA environment construction

How painful is it to write unit tests?
随机推荐
Notification设置的小图标显示的是小方块
【论文笔记】基于在线预测和规划的机器人动态跟踪抓取方法
Mocha test
ribbon 执行逻辑源码解析
驱动板网线直连电脑共享网络配置
Anaconda~Upload did not complete.
The fourth experiment nat
QT add mouse event to control
AI首席架构师12-AICA-工业生产过程优化场景下产业落地解析
新媒体运营策略(以小红书为例)帮助你快速掌握爆款创作方法
汇编语言与微机原理实验一、实验二、实验三:分支程序设计/循环程序设计/子程序设计
DHCP first static experiment
Mysql数据类型
The third experiment OSPF
How to obtain the cash flow data of advertising services to help analyze the advertising effect?
Matrixcube unveils the complete distributed storage system matrixkv implemented in 102-300 lines
【MySQL提权】UDF提权(附带大马)
The third programming competition of Wuhan University of technology b- save the kingdom of DAG (topological properties deal with accessibility Statistics)
HJ9 提取不重复的整数
Why is Google's internal tools not suitable for you?