Re: [Flightgear-devel] Re: NASAL Scripted Pushback

2005-12-01 Thread Erik Hofman

Carsten Hoefer wrote:


BTW: How do I play sounds by Nasal scripts?


The same way one would do animations using Nasal;

Adjust properties in Nasal (they may be private properties in your own 
subtree of the property list, say /tmp/aircraft) and let the sound 
configuration file act on those properties.


Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: NASAL Scripted Pushback

2005-11-30 Thread Carsten Hoefer

Andy Ross schrieb:


Steve Knoblock wrote:
 


1. Will Nasal scripting give me all options to program the
push-back function (incl. playing sound files and checking
distances to other planes or to next taxi way)?
 



 


I am not sure of this, but NASAL can listen for properties and then
change properties,
   



Yes, Nasal interacts with the rest of FlightGear through the property
and FGCommand subsystems, and in a few special cases by extension
functions (settimer() and random() being the only ones I can think of
off the top of my head).

So anything you can do through those mechanisms is scriptable.
Anything the you *can't* do through those mechanisms is either
something that we don't want to script (3D rendering, FDM internals),
or just haven't gotten around to.  Wiring up property/command
interfaces for C++ subsystems is generally pretty easy.

Andy
 

Ok, it looks like I'm able to set the body velocity (uBody) to a certain 
value by a nasal-script and the plane makes some kind of hoop forward. 
But I got the impression, that the fdm automatically 'resets' my 
velocity to the correct value generated by the thrust of the engine.
I did try to set the value in a for-loop, but this only sets the 
velocity x-thousand times to  a value without moving the plane.
So is there any way to update the graphics in a loop or to set a 
rearward velocity for a certain distance/time?


BTW: How do I play sounds by Nasal scripts?

TIA, Carsten

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: NASAL Scripted Pushback

2005-11-29 Thread Steve Knoblock
On Tue, 29 Nov 2005 05:57:53 -0600, you wrote:

or just haven't gotten around to.  Wiring up property/command
interfaces for C++ subsystems is generally pretty easy.

Andy

Is there a list of all properties or commands available or how do I find 
the appropriate functions?
I allready found the readme.properties, but looking at Steve's 
autopilot.nas I can see some more properties that are not listed in the 
readme.

Setting a property that does not exist in the property tree creates
it. This gives you the ability to create your own properties in the
FlightGear property tree just by bringing them into existence in your
NASAL script.

I created some properties for internal use by the autopilot. The idea
cane from looking at KAP140 autopilot code. You may want to look at
that, which mine is partly based on. The reason for creating my own
properties was to isolate properties that are special to the
particular autopilot and to keep the properties organized.

I did have some trouble finding out what properties are available. I
looked through every .nas  and XML file I could find in the
distribution until I had a good idea of the properties I needed. I
read the list of properties in the source documentation. I watched
some properties in the property viewer (on the File menu).

I am unsure if there is a complete and comprehensive list of default
FlightGear properties yet. Someone should know on the list.

Steve



___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: NASAL Scripted Pushback

2005-11-28 Thread Steve Knoblock
On Mon, 28 Nov 2005 06:42:53 -0600, you wrote:

Here are my first questions:
1. Will Nasal scripting give me all options to program the push-back
function (incl. playing sound files and checking distances to other
planes or to next taxi way)? Or will I have to use c++ (if so, is there
anyone who is interessted to give me some beginners support?)?

2. Why does appling a body-u-velocity not work?

I am not sure of this, but NASAL can listen for properties and then
change properties, so if you can take actions based on a monitored
property (for example, I monitor various orientation/navigation
properties to implement GPS tracking in my autopilot) and set
properties that play the sounds or move the aircraft, it may be
possible. I just do not know if you connect to those actions from the
script. Maybe if an animation is based on a property, you could change
it from script.

I believe the property may be read only. Perhaps it just reports the
velocity, but setting the velocity does not side effect the aircraft.

It would be interesting if features like this could be added to
FlightGear by creating custom GUI interfaces and use NASAL to drive
the feature. I built a GUI for some features of the autopilot I
modeled for which the face plate does not have any controls.

Steve



___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: NASAL Scripted Pushback

2005-11-28 Thread Andy Ross
Steve Knoblock wrote:
  1. Will Nasal scripting give me all options to program the
  push-back function (incl. playing sound files and checking
  distances to other planes or to next taxi way)?

 I am not sure of this, but NASAL can listen for properties and then
 change properties,

Yes, Nasal interacts with the rest of FlightGear through the property
and FGCommand subsystems, and in a few special cases by extension
functions (settimer() and random() being the only ones I can think of
off the top of my head).

So anything you can do through those mechanisms is scriptable.
Anything the you *can't* do through those mechanisms is either
something that we don't want to script (3D rendering, FDM internals),
or just haven't gotten around to.  Wiring up property/command
interfaces for C++ subsystems is generally pretty easy.

Andy

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: NASAL Scripted Pushback

2005-11-28 Thread Carsten Hoefer

Andy Ross schrieb:


Steve Knoblock wrote:
 


1. Will Nasal scripting give me all options to program the
push-back function (incl. playing sound files and checking
distances to other planes or to next taxi way)?
 



 


I am not sure of this, but NASAL can listen for properties and then
change properties,
   



Yes, Nasal interacts with the rest of FlightGear through the property
and FGCommand subsystems, and in a few special cases by extension
functions (settimer() and random() being the only ones I can think of
off the top of my head).

So anything you can do through those mechanisms is scriptable.
Anything the you *can't* do through those mechanisms is either
something that we don't want to script (3D rendering, FDM internals),
or just haven't gotten around to.  Wiring up property/command
interfaces for C++ subsystems is generally pretty easy.

Andy

Is there a list of all properties or commands available or how do I find 
the appropriate functions?
I allready found the readme.properties, but looking at Steve's 
autopilot.nas I can see some more properties that are not listed in the 
readme.


How will I know if a property is read-only or if I have a bug in my code?

Thanks, Carsten

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d