Crop geoglobe not to show the whole Earth without distortion of the view

1 次查看(过去 30 天)
I am trying to plot part of the Earth with some beams from a geostationary satellite. I basically plot the Earth as seen from the geostationary satellite and plot the beams on the Earth. The code works but the Earth is small and I haven't found a way to just show the part of the Earth where the beams are! I want to maintain the projection from the satellite to avoid distorsion of the beams. I am relatively new...
Any ideas? Thanks
lat = 0; % in degrees
lon = 13; % in degrees
h = 35678500; % in m
uif=uifigure;
%g=geoglobe(uif,'basemap',"landcover");
g=geoglobe(uif,'Terrain','none');
campos(g,lat,lon,h);
hold (g,"on")
N=length(beamE)/2
for n=1:N
% "ellipsoid" – Height values are relative to the WGS84 reference ellipsoid
geoplot3(g,beamE(:,2*n),beamE(:,2*n-1),0,"HeightReference","ellipsoid")
hold (g,"on")
end
hold(g,'on')
%geolimits([LimLatS,LimLatN],[LimLonW,LimLonE]);
end
The geoplot3 line can be commented out.
This is what I get:
The earth is a bit small but this is what I would like to get. (I cheated and used Paint to crop...)
Any ideas are very welcome or even if I can be pointed in the right direction.
Thanks in advance

回答(1 个)

R
R 2024-4-24
编辑:R 2024-4-24
The campos function sets or queries the position of camera for geographic globe. You can follow the example below from the MATLAB documentation to programatically control the view of the geoglobe:
Let me know if this works!
  3 个评论
R
R 2024-4-24
Thanks for the clarification. I played around with the code and was able to leverage the Position property of geoglobe. I think this might help:
lat = 17; % in degrees
lon = 11.3089; % in degrees
h = 1.0506e+07; % in m
uif=uifigure;
g=geoglobe(uif,'Terrain','none',"Position",[-0.25 -0.5 1.5 1.5]);
campos(g,lat,lon,h);
You can explore this property further to fit the globe according to your workflow:
Hector
Hector 2024-4-25
Thanks for your time and support. You solution works up to a limits. I have updated to code to include your suggestion as shown below:
size=5
g=geoglobe(uif,'Terrain','none',"Position",[-1.8 -1.8 size size]);
What I get is much better as can be seen:
But it does not seem to work beyond size = 5. There is still a large portion of the Earth as space of no interest! The limit is a bit strange since I have not been able to find limits in the documentation...
Thanks again

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Reference Applications 的更多信息

标签

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by