Here's a screenshot of a radar instrument:

http://home.comcast.net/~davidculp2/radar.jpg

It's a 2D instrument, radar.xml, that can be used by any aircraft, just add it 
to your current panel.  The only targets that will appear are those of the 
AIAircraft class.  In this screenshot the target is an AI A-4 which is 
orbiting northwest of KSFO at 5000 feet.  If you have good weather you should 
be able to find the A-4 using the radar.  It's still a challenge because of 
the A-4's small size.  Presently the radar is stuck on 40 mile scale, but 
this will soon change.

To set the A-4 up just add this to your preferences.xml in the <ai> section:

   <entry>
    <type>aircraft</type>
    <class>light</class>
    <path>Aircraft/a4/Models/a4-blue.xml</path>
    <speed-KTAS type="double">320.0</speed-KTAS>
    <altitude-ft type="double">5000.0</altitude-ft>
    <longitude type="double">-122.6</longitude>
    <latitude type="double">37.9</latitude>
    <heading type="double">210.0</heading>
    <bank type="double">-15.0</bank>
   </entry>


The radar has a 360 degree view, which is not realistic for most aircraft, but 
it's OK for AWACS, ground radar, and data-linked radar data.  And it 
demonstrates the technology.

Innis asked about weather radar, and it turns out it would be easy to add an 
AIThunderstrom class, which would look very much like the AIAircraft class.  
They could be set up along the coast, heading eastward at 20 knots.
The hard part is getting a huuuuuge 3D model of a thunderstorm, although a 
simple cylinder would suffice for testing purposes. 

This is very new stuff, so let me know if something isn't working right.  
Presently it works like this.  Every tenth sim tick the AIManager fetches the 
"user's" location from the property tree.  Each instance of FGAIAircraft 
calculates its own radar data at every update(), based on the user's 
location, and publishes it at ai/models/aircraft[n]/radar/.

It's in CVS now.  Let me know if anything doesn't work right.


Dave
-- 
****************************
David Culp
davidculp2[at]comcast.net
****************************

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to