20,741
edits
m (→Nasal code coupled to the autopilot system: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38170.html) |
m (→Nasal code coupled to the autopilot system: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38170.html) |
||
Line 197: | Line 197: | ||
Some FDM stuff would like to be tied to the FDM update rate, and 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. | Some FDM stuff would like to be tied to the FDM update rate, and 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 are several options, such as 1) Run a second events system and add an additional parameter to Nasal's settimer allowing you to use this new events system. 2) Add in a signal that is fired each simulation step, probably right before the Autopilot system is run. | |||
Also see: | Also see: | ||
* http://flightgear.org/forums/viewtopic.php?f=46&t=17069 | |||
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38170.html | * http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38170.html |