* leee -- Wednesday 24 October 2007:
> the FDM operates at a fixed rate (I believe the default is 120 Hz)
> but nearly everything else, afaikt, operates at the frame rate,
> which varies. 

Yes, but most Nasal code does things that influence visuals/sound
(like instrument stuff, view handling, etc.), so there's a natural
relationship with the frame rate. Tying Nasal to the frame rate
therefor makes sense. Otherwise we would probably see interference
artifacts ... good old jitter.  :-)

Only FDM stuff would like to be tied to the FDM update rate, and
I think that's a desirable goal. What about a callback function
then? The FDM subsystem would set /sim/signals/fdm-update, and you
could attach a listener to that which does all the things that
should interact with the FDM, such as AP, FCS, etc. The rest of
Nasal would keep running with the frame rate.

There's just one (minor) problem at the moment. There's no generic
FDM update() function where one could put a sig.setDoubleValue(dt).
This would have to be done in all FDMs.

Interested aircraft would then do something like ...

   setlistener("/sim/signals/fdm-update", func(n) {
       var dt = n.getValue();
       # ... and whatever needs to be done at fdm rate
   });

m.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to