Craig Phillips
-
Posts
13 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Craig Phillips
-
-
I did notice a problem that I had with retreiving the traffic data, however that is now resolved.
Here is a snipbit of the code, it is in Visual Basic, but it should be easy enough to understand:
gcbearing = the bearing from current plane to one of the traffic
nmm = is the distance between the two planes in Nautical Miles
The Mod function cancels a number down, for example:
369 Mod 360 = 9
180 Mod 90 = 90
181 Mod 90 = 1
(180 / (4 * Atn(1))) = is the radians
127.5 = is the ratio to draw on the radar
po = gcbearing Mod 90 po = gcbearing / (180 / (4 * Atn(1))) 'Find the height hi = (Sin(po) * nmm) * 127.3125 'Find the length lo = (Cos(po) * nmm) * 127.3125 'Plot the planes on the radar screen If gcbearing > 0 And gcbearing < 90 Then plane1(i).Top = (plane1(0).Top + hi + (plane1(i).Height / 2)) * 1 plane1(i).Left = (plane1(0).Left + lo + (plane1(i).Width / 2)) * 1 ElseIf gcbearing > 90 And gcbearing < 180 Then plane1(i).Top = (plane1(0).Top + hi + (plane1(i).Height / 2)) * 1 plane1(i).Left = (plane1(0).Left + lo + (plane1(i).Width / 2)) * 1 ElseIf gcbearing > 180 And gcbearing < 270 Then plane1(i).Top = (plane1(0).Top + hi + (plane1(i).Height / 2)) * 1 plane1(i).Left = (plane1(0).Left + lo + (plane1(i).Width / 2)) * 1 ElseIf gcbearing > 270 And gcbearing < 360 Then plane1(i).Top = (plane1(0).Top + hi - (plane1(i).Height / 2)) * 1 plane1(i).Left = (plane1(0).Left + lo - (plane1(i).Width / 2)) * 1 End If
I hope this is understandable.
Thanks
Craig
-
Yep done all that and it still is not working. Any other suggestions?
-
I have already used the functions to find out each X and Y, however it does not seem to work.Are the X and Y formulas the same for each quadrant? For example: Bearing > 0 and <90
b=Bearing
nm = Distance (nm)
x=Cos(b / (180/PI)) * nm
y=Sin(b/ (180/PI)) * nm
I am stuck on finding the x and y lengths. What are the other X and Y formulas for each quadrant?
Thanks
Craig
-
Pete
I am making a Traffic radar program just like TrafficLook, however my radar screen is "plane is north". If you get what I mean. I have been using the Aviation Formulary at http://williams.best.vwh.net/avform.htm.
I can work out the distance and the bearing from the current aircraft to the AI traffic, however I am unable to present it on the Radar screen. I have also been using trigonometry, however I am not familiar with it.
I was wondering if you could show me an example of how you present the traffic in TrafficLook. It would be much appriated. Thanks
CRaig
-
I do have Active Camera installed. Should I remove it?
Thanks
Craig
-
When I change a view from looking forward from to the right it will display a message that says 'Possibly cannot display the window'. Could you please help.
Thanx in advance
Craig
-
Hi
Just like to say in Fs2002 the Instructor flashes the gauge by programming in Adventure Basic Language (.abl files).
Regards :D
Craig
-
I am looking to make a AI Traffic promgram which will read all of the aeroplanes positions, heading, altitude and speed in FS2002 to be written in Visual Basic 6.
Thanx for your help
Craig
-
How would you write to FSUIPC in VB?
Ive been trying to set the pause function for ages. Could you send me an example?
Craig
-
How do you write to FSUIPC using Visual Basic.
I have been trying to set the pause control but it doesnt seem to work.
Please help.
Thanx
-
How do you write to FSUIPC in Visual Basic?
Traffic Radar
in FSUIPC Support Pete Dowson Modules
Posted
Ok thank you for your help anyway. I'll have to try a few more possiblities. And you were correct about 180 mod 90 = 0, sorry about that mistake, also 127.3125 is the number used.
Thanks
Craig