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
0 件のコメント
回答 (1 件)
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
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:
参考
カテゴリ
Help Center および File Exchange で Reference Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!