comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Making big triangle (FOV)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Making big triangle (FOV) [message #82247] Tue, 27 November 2012 04:59 Go to next message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
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!!
Re: Making big triangle (FOV) [message #82318 is a reply to message #82247] Thu, 06 December 2012 05:53 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
zolilemtumela@gmail.com writes:

> 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.

I think that the program is working OK, except
that you are drawing the FOV in device coordinates,
and you want to draw it (or, at least position
it) in map data coordinates. Then you have to decide
what units your radius is in. If you change to data
coordinates 220 is presumably in degrees, which makes
a pretty big arc on a map!

I set the radius to 5 degrees, and removed the DEVICE
keywords in TEST_FOV, and I seem to get a reasonable
arc centered at Goose Bay.

If you wanted to draw the arc in device coordinates,
then you could use Coord_Convert to convert your
map data locations to device coordinates before you
do the drawing. You will also need to do the same thing
for the radius value.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Making big triangle (FOV) [message #82320 is a reply to message #82247] Thu, 06 December 2012 02:32 Go to previous messageGo to next message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
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
Re: Making big triangle (FOV) [message #82436 is a reply to message #82247] Tue, 11 December 2012 02:16 Go to previous message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
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!!

Sorry, the right Radius = 3555 km
instead of 180 km, it should be big.
Any suggestion plz
Thanks
zolile
Re: Making big triangle (FOV) [message #82437 is a reply to message #82247] Mon, 10 December 2012 23:53 Go to previous message
zolile mtumela is currently offline  zolile mtumela
Messages: 50
Registered: September 2011
Member
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 for your response!!
I still need help, based program above
Radius=180 km
Ang1=3.24
Ang2=52
When I include device I got a big field of view similar to the one I am looking for, but located in wrong place.
When I removed device, I can located the field of view in a right place, but not big as I want, if its big, I donot get that arc(circle) between the last two points.
Please help me with suggestion, I real need to fix this, I have trying but I am not winning.
Many thanks
Zolile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: good mapping tutorial?
Next Topic: Displaying Cartesian coordinate data on a sphere

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:23 PDT 2025

Total time taken to generate the page: 0.00472 seconds