Howto talk:Implement a Fly-By-Wire System for Airliners: Difference between revisions

m (Aircraft specific configs)
Line 7: Line 7:
Seems you are looking to come up with a module that can be used for both, Airbus and Boeing aircraft? I can help you generalizing the Nasal code accordingly. But I would suggest not to use entirely different code here for similar modes. For functions that are specific to the aircraft manufacturer or the type of aircraft, it would be better to read in custom variables from the property tree, such as min/max bank, max roll rate, min/max AoA. These things could be conveniently specified in a separate [[PropertyList XML]] file. So aircraft developers would only need to copy and customize an XML file, and include it in their aircraft-set.xml file. This would help you keep your code pretty generic, reading aircraft-specific stuff from the property tree instead. Obviously, this would only need
Seems you are looking to come up with a module that can be used for both, Airbus and Boeing aircraft? I can help you generalizing the Nasal code accordingly. But I would suggest not to use entirely different code here for similar modes. For functions that are specific to the aircraft manufacturer or the type of aircraft, it would be better to read in custom variables from the property tree, such as min/max bank, max roll rate, min/max AoA. These things could be conveniently specified in a separate [[PropertyList XML]] file. So aircraft developers would only need to copy and customize an XML file, and include it in their aircraft-set.xml file. This would help you keep your code pretty generic, reading aircraft-specific stuff from the property tree instead. Obviously, this would only need
to take place during initialization/at startup, because the manufacturer or type of aircraft doesn't change at run time. So, you could set up some script-specific variables during init to customize your code with aircraft-specific data. --[[User:Hooray|Hooray]] 05:58, 7 February 2012 (EST)
to take place during initialization/at startup, because the manufacturer or type of aircraft doesn't change at run time. So, you could set up some script-specific variables during init to customize your code with aircraft-specific data. --[[User:Hooray|Hooray]] 05:58, 7 February 2012 (EST)
== Vectors and Hashes Error ==
Hooray, I tried your modifications and got this error:
Nasal runtime error: vector index 0 out of bounds (size: 0)
  at /usr/local/src/fgdata-2.4/Aircraft/787-8/Nasal/fbw.nas, line 91
449

edits