フィルターのクリア

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 Center および File ExchangeGeodesy and Mapping についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by