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