Howto:Methods to replace the NASAL code with JSBSim code: Difference between revisions

Jump to navigation Jump to search
Line 123: Line 123:
</source>
</source>


The tag ''<system name="Manual switches">'' defines the sub folder called ''manual switch'' of ''fdm/jsbsim/systems'' which contains the channels that manage manual switches. This is just one of the possible ways to organize the code. However, since the JSBSim code is very wordy (a typical fact in programming codes with XML syntax), it is convenient to subdivide the code into sub-folders and/or into separate files. From the point of efficiency in the execution of the code does not change much, but it makes the code much easier to maintain. Every JSBSim property and object is visible to the whole JSBSim code, this is certainly convenient, but it is better to always write a very structured code in order to be able to effectively maintain the program in the future!
The tag ''<system name="Manual switches">'' defines the module called ''manual switch'' which contains the channels that manage manual switches. This is just one of the possible ways to organize the code. However, since the JSBSim code is very wordy (a typical fact in programming codes with XML syntax), it is convenient to subdivide the code into sub-folders and/or into separate files. From the point of efficiency in the execution of the code does not change much, but it makes the code much easier to maintain. Every JSBSim property and object is visible to the whole JSBSim code, this is certainly convenient, but it is better to always write a very structured code in order to be able to effectively maintain the program in the future!


The tag: ''<property value="0">fdm/jsbsim/systems/switches/sw-test-togle</property>'' defines the memory of the state of the circuit breaker that is written, through a binding, execute by a specializzate Flightgear program, that combines the XML of the PropertyList with the JSBSim code.
The tag: ''<property value="0">fdm/jsbsim/systems/switches/sw-test-togle</property>'' defines the memory of the state of the circuit breaker that is written, through a binding, execute by a specializzate Flightgear program, that combines the XML of the PropertyList with the JSBSim code.
408

edits

Navigation menu