Hi all,

I commited this morning a new version of radardist.nas. Now, radardist.nas
reads its datas from an XML file:

    $FG_ROOT/Aircraft/Generic/radardist.xml

There isn't any change in the way to call radardist.nas functions and the
script behaviour is exactly the same, but now, the datas can also be read in
the property tree (/instrumentation/radardist/datas/...).

To use it:
- you still need to declare the script in my_aircraft-set.xml

       <nasal>
          <radardist>
             <file>Aircraft/Generic/radardist.nas</file>
          </radardist>
       </nasal>

- but now, you also need to initialize it (from any of your own aircraft
nasal scripts):

    radardist.init();

- then you can use it without changes (from your own radar script) like 
this:

    my_radarcorr = radardist.my_maxrange("f-14b");

which will return your corrected radar maximum range. And like this:

    visible = radardist.radis(target, my_radarcorr);

Wich will returns true if the target is visible by your radar.


Tests and feedback are welcome.

Alexis


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to