Map_Set and Sat_P [message #32643] |
Thu, 24 October 2002 15:06 |
doyle
Messages: 6 Registered: April 2002
|
Junior Member |
|
|
Hi everyone,
I've got kind of a wierd problem (but then aren't they all). I'm
using Map_Set with a satellite projection to show a longitude,
latitude track. I'm setting the projection limit around the midpoint
of the data but when the graph appears the start of the track is off
to the right side and down of the center point and the end of the
track is out of the projection entirely. I can't figure out why this
is happening and would appreciate your help in figuring out how to
solve my problem. I've included the program that does all this stuff
and draws the graph. A couple of notes: exp_data is just a huge data
structure. I'm using IDL 5.3. I'm calling the included program along
with some others to make a window with multi plots on it. I figured
that might be important in case !p.multi had anything to do with the
problem.
Thanks in advance
Nate Doyle
pro plot_sc_track,exp_data
; plots position of satellite for given timespan
k=n_elements(exp_data)
midpoint_lat=mean(exp_data.sc_lat)
midpoint_lon=mean(exp_data.sc_lon)
;determine the limits of the map projection
p=min(exp_data.sc_lat)
q=max(exp_data.sc_lat)
u=min(exp_data.sc_lon)
v=max(exp_data.sc_lon)
;removes any ambiguity from experiments that cross the dateline or are
;carried out near the poles.
dlat=abs(q-p)
dlon=abs(v-u)
if dlon gt 180 then dlon=abs(dlon-360)
y=midpoint_lat
x=midpoint_lon
z=30
lim=[y-z,x-z,y+z,x-z,y+z,x+z,y-z,x+z]
;add in the SAA polygon
read_saa_region,n,maxlat,vlat,vlon,r,n_vertices
n_vertices=n_vertices[0]
map_set,/satellite,sat_p=[1.4,0,0],y,x,/continents,/advance, $
limit=lim,/usa,/grid
;plots the satellite track on to the map
polyfill,vlon,vlat,color=5
oplot,exp_data.sc_lon,exp_data.sc_lat,psym=1,color=4
xyouts,exp_data[0].sc_lon,exp_data[0].sc_lat,'Start'
xyouts,exp_data[k-1].sc_lon,exp_data[k-1].sc_lat,'Finish'
end
|
|
|