Skip to content
Snippets Groups Projects
Commit 926225a1 authored by gael.alory_legos.obs-mip.fr's avatar gael.alory_legos.obs-mip.fr
Browse files

gestion de la carte pour les tours du monde

parent 693b22bd
No related branches found
No related tags found
No related merge requests found
......@@ -47,12 +47,21 @@ if ~isempty( ind )
latRange = (latMax-latMin);
latMin = max(min(latMin - 0.05*latRange, latMin - 2), -90);
latMax = min(max(latMax + 0.05*latRange, latMax + 2), 90);
if lonMax > (lonMin+360)
lonMax = lonMin+360;
end
lonRange = (lonMax-lonMin);
lonMin = min(lonMin - 0.03*lonRange, lonMin -2);
lonMax = max(lonMax + 0.03*lonRange, lonMax +2);
lonRange = (lonMax-lonMin);
if lonRange>=360
lonMin = -183.6;%to account for fancy frame
lonMax = 183.6;
tsg.lonplus = 180;
tsg.lonmod = 360;
else
tsg.lonplus = 0;
tsg.lonmod = 0;
end
% Positionning the right axes
% ----------------------------
......@@ -121,8 +130,13 @@ if ~isempty( ind )
% ----------------------------------------------
ind = find( tsg.SSPS_QC == qcCode & isnan(tsg.SSPS) == 0);
if ~isempty( ind )
m_line(tsg.LONX(ind),tsg.LATX(ind), 'LineStyle', 'none', 'marker','*',...
'markersize',2,'color',qcColor);
% if lonRange>=360
m_line(mod(tsg.LONX(ind)+tsg.lonplus,tsg.lonmod)-tsg.lonplus,tsg.LATX(ind), 'LineStyle', 'none', 'marker','*',...
'markersize',2,'color',qcColor);
% else
% m_line(tsg.LONX(ind),tsg.LATX(ind), 'LineStyle', 'none', 'marker','*',...
% 'markersize',2,'color',qcColor);
% end
end
end
......@@ -134,5 +148,9 @@ if ~isempty( ind )
set(hLines(i), 'Tag', ['TAG_PLOT4_LINE_MAP' int2str(i)]);
end
% Save tsg structure
% ------------------
setappdata( hTsgGUI, 'tsg_data', tsg);
end
end
......@@ -41,6 +41,8 @@ if ~isempty(tsg.indcross)
tsg.LONX(tsg.indcross(i)+1:end)=tsg.LONX(tsg.indcross(i)+1:end)-tsg.loncross(i);
end
end
tsg.lonplus = 0;
tsg.lonmod = 0;
% get min and max values for position and set to globals attributes
% -----------------------------------------------------------------
......
......@@ -2326,10 +2326,11 @@ hrbInterpCancel = uicontrol( ...
% Plot a Marker (Red point) on the ship track
% -------------------------------------------
hMarker = m_line( tsg.LONX(indCursor(1)), tsg.LATX(indCursor(1)),...
hMarker = m_line( mod(tsg.LONX(indCursor(1))+tsg.lonplus,tsg.lonmod)-tsg.lonplus,...
tsg.LATX(indCursor(1)),...
'Marker','o','MarkerSize',5, ...
'Color','r', 'MarkerFaceColor','r');
% Put a tag on the Marker - This tag allows to get the handle
% of the Marker
% -----------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment