필터 지우기
필터 지우기

How would i convert latitude and longitude to meters from a point?

조회 수: 51 (최근 30일)
Viktor
Viktor 2012년 7월 19일
답변: Meysam Mahooti 2019년 11월 1일
I have lots of data points (over 50000) of measured positions from a gps antenna where i have the latitude and longitude of every point. What I would like to do is to plot the points relative to a reference points where the scale of the axis are in meters. I would assume that since the area of the points is very small (approx. 10-20 meters) it is possible to assume that the surface is not a part of a sphere but is a flat surface. Please help me on how to plot this.
Preferably I would like the plot to look something like this:
with meters as the scales on the axis. Atm the only thing I have achieved is scatter(ChipLatLong(:,1),ChipLatLong(:,2))
Which is just a plot of the latitude and longitude on a regular graph.
I would be very thankful for any response
Viktor

답변 (1개)

Meysam Mahooti
Meysam Mahooti 2019년 11월 1일
%--------------------------------------------------------------------------
%
% Position: Position vector (r [m]) from geodetic coordinates
% (Longitude [rad], latitude [rad], altitude [m])
%
% Last modified: 2018/01/27 M. Mahooti
%
%--------------------------------------------------------------------------
function r = Position(lon, lat, h)
R_equ = 6378.137e3; % Earth's radius [m]; WGS-84
f = 1/298.257223563; % Flattening; WGS-84
e2 = f*(2-f); % Square of eccentricity
CosLat = cos(lat); % (Co)sine of geodetic latitude
SinLat = sin(lat);
% Position vector
N = R_equ/sqrt(1-e2*SinLat*SinLat);
r(1) = (N+h)*CosLat*cos(lon);
r(2) = (N+h)*CosLat*sin(lon);
r(3) = ((1-e2)*N+h)*SinLat;

카테고리

Help CenterFile Exchange에서 Geodesy and Mapping에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by