|
From: James T. <zak...@ma...> - 2009-11-06 15:33:16
|
On 6 Nov 2009, at 14:47, dave perry wrote: > It seems to me it should be possible in controls.nas to choose between > the two values for aileron and two values for elevator based on an > agreed upon autopilot properties. To do this, one needs to be able to > access the joystick axis value. This is one of the reasons I had to make the autobrakes be C++ code, and make some other unpleasant changes - we're missing a layer of abstraction between 'input system output properties' and 'FDM input properties'. I found there's many joystick config files that expect full ability to mess with the /controls properties - which seems reasonable. What's not reasonable is that the FDMs read the same properties directly, which makes life hard for auto[pilot|brake|etc] systems. For YASim, it's bearable, since the 'input' control properties are defined in the aircraft XML files (so I redefine the YAsim brake inputs to be / autopilot/autobrake/left-brake-output instead of /controls/left-brake, for example), but for JSBSim I needed to change the glue C++ code to stop it reading FGControls directly, if the autobrakes are active. (Yuck!) I'm not sure what the solution is - I think it's to create a tree of 'fdm-input' properties analogous to /controls, which is not touched by any joystick scripts / external inputs / etc, and which by default is simply a copy of the /controls values, but which the autopilot (and similar systems) can manipulate. That's exactly what my C++ autobrake currently does, btw, and this was necessary to be able to correctly implement the interaction between autobrake input and pilot over-ride inputs; namely that any pilot control input automatically disarms the autobrake system. Regards, James |