On Tuesday, November 27, 2012 2:59:15 PM UTC+2, zolile...@gmail.com wrote:
> Hi all I have a program the can do mapping. I need help , I want to plot a field of view of the radar in the map. Field of view its like a big triangle but at the two end points form something like curve to merge those points. I do nt hv any idea how to make that kind of curve. I used plots to make triangle (FOV). Hence its not a pure triangle , can you help on making that kind of curve! I have been looking for some kind of routine but I dnt get any help. All suggestions all welcome. Thank you in advance for ur time!!
Hi all, thank so much with ur help.
I have been trying to link this arc function and the program to a map program. I want to plot the FOV in a map with the mentioned coordinates, but the program is not doing that. I suspect that I am not calling the first program in a right way. I real need help, and suggestions please.
Function Arc, xcenter, ycenter, radius, angle1, angle2
IF N_Elements(angle1) EQ 0 THEN angle1 = 0.0
IF N_Elements(angle2) EQ 0 THEN angle2 = 90.0
points = (2*!DPI*!RaDeg/999.0)*Findgen(1000)
indices = Where((points GE angle1) AND (points LE angle2),count)
IF count GT 0 THEN points = points[indices]
x = xcenter + radius * COS (points * !Dtor)
y = ycenter + radius * SIN (points * !Dtor)
RETURN, Transpose ([[x], [y]])
END
pro test_fov
;window,/free,xsize=600,ysize=600
center=[299.54,53.32]; [-60.46,53.32][lon,lat]
;center=[150.0,125.0]
Radius=220
Ang1=26 ; azimuthal=3.24
Ang2=90 ;52
plots,[center[0],center[0]+Radius*cos(Ang1*!Dtor)],[center[1 ], center[1]+Radius*sin(Ang1*!Dtor)],/device
plots,[center[0],center[0]+Radius*cos(Ang2*!Dtor)],[center[1 ], center[1]+Radius*sin(Ang2*!Dtor)],/device
;plots,[center[0],center[0]+Radius*cos(Ang1/!RaDeg)],[center [1], center[1]+Radius*sin(Ang1/!RaDeg)],/device
;plots,[center[0],center[0]+Radius*cos(Ang2/!RaDeg)],[center [1], center[1]+Radius*sin(Ang2/!RaDeg)],/device
plots,arc(center[0],center[1],Radius,Ang1,Ang2),/device
end
PRO map_north
lthick=1.2
; save charsize, this subroutine changes it
pchar=!p.charsize
; Draws Orthographic projection of map, complete with continents and grid lines
; MAP_SET,90,-30,/ORTHOGRAPHIC,/ISOTROPIC,/GRID,/CONTINENTS,LI MIT=[45,-120,90,60],$
; LATDEL=5,LONDEL=30,label=2,latlab=120,lonlab=45,MLINETHICK=l thick,CHARSIZE=0.8,/NOBORDER
map_set,90,-30,/ortho,/isotropic,limit=[45,-120,90,60],/cont inents,$
/label,latlab=120,lonlab=45,/grid,latdel=5,londel=30
; arrays to hold latitude and longitude of magnetometers
maglat = [78.92, 78.20, 77.00, 61.106, 58.763, 62.824, 69.540, 72.78, 70.68, 69.25,$
67.93, 67.03, 65.42, 64.17, 62.00, 61.18 ]
maglon = [11.95,15.82, 16.60, 265.950, 265.920, 277.890,266.450, 303.85,307.87,$
306.47, 306.28, 309.28, 307.10,308.27, 310.32, 314.56]
!P.CHARSIZE=0.5
oplot,maglon,maglat,psym=1 ;Plot with a *
Lons=maglon
Lats=maglat
magnetometers =['NAL','LYR','HOR','ESKI','FCHU','RANK','TALO','UPN','UMQ', 'GDH','ATU','STF','SKT','GHB','FHB','NAQ']
FOR i=0,n_elements(magnetometers)-1 DO xyouts,Lons(i),Lats(i),magnetometers(i);,CHARTHICK=1.2,CHARS IZE=1,/DATA,color=8
test_fov
;if ~keyword_set(map) then begin
;xyouts,299.54,53.32,'Goose Bay'
;test_fov;,299.54,53.32
;endif
;for j=0,4 do begin
;y=90 - j*20
;test_fov
;endfor
;plots,[299.54,197,-29],[53.32,76.00,69]
;plots,[299.54,265,340,299.54],[53.32,78.00,69.00,53.32]
youts,[299.54,339.46,253.47],[53.32,63.77,52.16],['Goose Bay','B','C'],CHARTHICK=1.2,CHARSIZE=1;,/DATA,color=10
end
At the moment I am interested in position Goose Bay, Its where I want to locate the fov.
Many thanks
Zolile
|