I want to plot a map of rho(range) and theta(degrees) data around a center point at a map point of lat and long coordinates, where i later include basemaps, depth information and so on.
Is there a matlab function already available for this problem, where i could transformed x y z data to lat long value data?
I get range and angle data in meters and Degrees from a certain center point and the certain values at this point. Plotting of this is pretty easy, except that it is not georeferenced. For later use with plotted georeferenced data like topographic maps it is complicated to get a proper map. My goal is to center the whole map around a certain point and include topography, maps, datapoints and so on.
My previous approach was to "cut" the map accordingly to the center point, but this doesnt work properly in terms of measurement of range.
theta = [90,60,30,0,330,300,270,240];
rho = linspace(0,100000,15);
lvalues = randi([10 50],15,8);
rMin = min(rho);
rMax = 100000;
thetaMin=min(theta);
thetaMax =max(theta);
rRange = rMax - rMin;
rNorm = rho/rRange;
YY = (rNorm)'*cosd(theta);
XX = (rNorm)'*sind(theta);
figure('units','normalized','outerposition',[0 0 1 1]);
projection = 'mercator';
L0 = get(gcf, 'Position');
ha0 = axesm (projection);
cax = gca;
[c,h] = contourf(XX,YY,lvalues)
hold off
set(cax,'dataaspectratio',[1 1 1]);
axis off;
L1 = get(gcf, 'Position');
ax1 = axes('Position', L0);
ha1 = axesm (projection,...
'MapLonLimit', [-58.1 -53.9],...
'MapLatLimit', [-62.1 -59.9],...
'Grid', 'on',...
'Frame', 'off');
setm(ha1,'MLabelLocation', [-58 -57 -56 -55 -54]);
setm(ha1,'MLineLocation',1,'PLineLocation',1/3);
setm(ha1, 'PLabelLocation', [-62 -61.66 -61.33 -61 -60.66 -60.33 -60]);
mlabel on;
plabel on;
axis off;
tightmap;
load topo
contour3m(topo,topolegend,0:-100:-2000,'LineColor','black')
L2 = get(ha1, 'Position');
axes('Position', L1)
ha3 = axesm (projection);
p1 = plot(-56,-61,'rx', 'LineWidth', 2, 'MarkerSize', 5);
mlabel on;
plabel on;
axis off;
hold on