* Stewart Andreason -- Wednesday 24 January 2007:
> Is there a programmer's guide to nasal and xml?

Use of Nasal in XML is no different from using it elsewhere.
Here in this case you can't embed any nasal:
 
>      <emission>
>        <factor-prop>/velocities/airspeed-kt</factor-prop>
>        <red>0.0002</red>
>      </emission>
> 
> doesn't work when airspeed is negative.

But you can simply use a different property and write some Nasal
elsewhere that updates that airspeed property accordingly:

     <factor-prop>/velocities/abs-airspeed-kt</factor-prop>

In a *.nas file or elsewhere:

  var airspeed = props.globals.getNode("/velocities/airspeed-kt", 1);
  var abs_airspeed = props.globals.getNode("/velocities/abs-airspeed-kt", 1);

  update_airspeed = func {
      var a = abs(airspeed.getValue());
      abs_airspeed.setDoubleValue(a);
      settimer(update_airspeed, 0);
  }
  update_airspeed();

You may have to initialize the airspeed property or defer its usage
(via /sim/signals/fdm-initialized listener if you are using fg/cvs).    



> 2nd:
> Does the ufo flight model have any variables I can set, to Detect the ground 
> and stay above it?

No. The ufo FDM was never thought to simulate an "actual" ufo. It's
just the scenery browser and was originally thought (by the author)
to replace the old scenery browser -- the "magic" FDM. That's why
it doesn't have any fancy features, and I somehow doubt any such will
be added for nicer UFO experience.



> 3rd:
> Does the ufo flight model support vertical take offs and landings?
> (I see reactor jets in the harrier model, but ...)

No. You could, of course, fake that via a dynamic_view like
mechanism. Just tilt 3D model and view. Or use an FDM that
supports it. That would be YASim.


 
> 4th:
> material emissions do not cast light on nearby surfaces. Are there other 
> light 
> sources available?

Not yet. I bet Mathias has plans for that.  :-)



> My thanks to Melchior for the bo105 files to learn animation from, and for 
> the 
> blender-textured-lights tutorial.

I'm glad that at least a few people look at this stuff. :-)
unfortunately, the fgfs_animation.py is broken and waits for a fix.

m.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to