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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

R
R il 24 Apr 2024
Modificato: R il 24 Apr 2024
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 Commenti
R
R il 24 Apr 2024
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 il 25 Apr 2024
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

Accedi per commentare.

Categorie

Scopri di più su Reference Applications in Help Center e File Exchange

Tag

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by