How would i convert latitude and longitude to meters from a point?
43 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!