Re: [Flightgear-devel] fun with nasal ai

2007-07-01 Thread Melchior FRANZ
* Melchior FRANZ -- Friday 29 June 2007:
 Here's a new, adapted ai.nas version:
 
   http://members.aon.at/mfranz/ai.nas  [1.7 kB]

If you try this out with CVS/HEAD and it doesn't work, then just
download it again from here, as I'll upload new versions if necessary.
I just did that, as a commit to $FG_ROOT/Nasal/io.nas broke it.

I won't mention updates here anymore, but I'm confident that it's
final now. It was only a short demo anyway.   :-)

The commit to io.nas implements an io.writexml() that can be used
to write parking.xml (and other non-standard XML) files back to
the disk.

m.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] fun with nasal ai

2007-06-30 Thread Melchior FRANZ
* Melchior FRANZ -- Friday 29 June 2007:
   http://members.aon.at/mfranz/ai.nas  [1.7 kB]
 
 It's a bit faster, too, although 8.7 seconds for EHAM/parking.xml
 is still a lot (was 12.8 before).

And that comes from bad Nasal code, not from the c(++) expat/EasyXML
parser code, which is very fast. Fixed in $FG_ROOT/Nasal/io.nas.

Reading EHAM/parking.xml, parsing and converting to property tree:

  Before -- 9.015211 s
  Now-- 0.619772 s

Placing the models still takes several seconds, and I'm afraid I
can't do much here. We'll see ...


What the bad Nasal code was, you ask? Using size(n.getChildren(foo))
to determine the index of the next foo node to generate. That's
the standard way of doing it, but in a case like mine where I don't
add to an unknown node dir, but generate *all* of the nodes myself,
anyway, I can just count them. A lot faster.  :-)

What we learn: don't use props.Node.getChildren() if avoidable. 

m.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] fun with nasal ai

2007-06-29 Thread Melchior FRANZ
* Melchior FRANZ -- Thursday 28 June 2007:
 And what is it good for? For *nothing*. Well, for showing off
 some recent Nasal additions: [...] the xml parser.

... which I just removed. We have an interface to the built-in
parser now. Here's a new, adapted ai.nas version:

  http://members.aon.at/mfranz/ai.nas  [1.7 kB]

It's a bit faster, too, although 8.7 seconds for EHAM/parking.xml
is still a lot (was 12.8 before).

BTW: the idea was to import the parking files into the ufo model
editor, so that one could add taxi (and other) node points, edit
existing ones, and finally dump new files. Maybe later ...

m.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] fun with nasal ai

2007-06-28 Thread Thomas Förster
Am Donnerstag 28 Juni 2007 22:02 schrieb Melchior FRANZ:
 Here's a small Nasal file to play with (attached). If you put
 it into $FG_ROOT/Nasal, start fgfs with the ufo and press the
 g-key, then you get a file-select dialog where you can select
 a parking.xml file. When you click the Load button, then an
 object is placed at every TaxiNode of the chosen airport.

 And what is it good for? For *nothing*. 

GREAT addition for debugging the ground network following code. THX. :-)

(Haven't tried it yet but sounds promising.)

Thomas
-- 
PhD Student, Dept. Animal Physiology, HU Berlin
Tel +49 30 2093 6173, Fax +49 30 2093 6375

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] fun with nasal ai

2007-06-28 Thread Melchior FRANZ
* Melchior FRANZ -- Thursday 28 June 2007:
 Here's a small Nasal file to play with (attached).

Whoops ... please change the setlistener call to a _setlistener
call (with leading underscore). Otherwise it may not run on some
systems.

m.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel