Maybe you already looked into this , but to me it would make more
sense to bind the joystick buttons to activate the <enable> properties
in the actual autopilot.xml files rather than modifying the author's
specialized scripts.Or write a generic nasal file to handle the
variety of different enabling methods ? The autopilot xml file does
the real work , but enabling a mode can be set with pretty much any
property or condition the author decides on ,so that could be a large
chore.Most extra nasal code was written for a reason , mainly to make
the autopilot behave like the real  one , so modifying that might be
tricky.Just my thoughts, if you,ve already discovered all that , i
apologize for the noise.
Cheers

On Fri, Apr 8, 2011 at 10:40 PM, Catherine James
<catherine.ja...@att.net> wrote:
>
> Recently, I've been spending a good bit of time attempting to program all of 
> my most-used aircraft so that I can engage and disengage the autopilot 
> through the joystick.  I've been able to get this to work on the Seneca II 
> with a short nasal script in Nasal/SenecaII.nasal that sets the 
> /autopilot/CENTURYIII/controls and /autopilot/CENTURYIII/locks properties 
> appropriately.  Silly me, I though it would be a simple matter to port the 
> working code over to the Comanche PA-24-250 (w/ CIII autopilot).
>
> Unfortunately, the structure of the nasal scripts of the PA24 bears very 
> little resemblance to that of the Seneca II.  Although the relevant autopilot 
> properties are the same for both planes, the flow of control is not.  For 
> example, turning on the autopilot roll axis control with the plane on the 
> ground is harmless in the Seneca, but will cause a nasal crash in the (stock, 
> unmodified) Comanche, and turning the autopilot off again will not recover.  
> (The ailerons will be locked permanently at 0 until you restart.)  The 
> routine that crashes is action-sim.nas, a file that doesn't even exist in the 
> Seneca. It contains an update_actions() script that is looped repeatedly, 
> updating positions of control surfaces, etc.  With the autopilot on, the 
> script attempts to get the appropriate aileron position from the autopilot, 
> but it returns null and then cause a setValue() error when it blindly tries 
> to set the actual aileron position to that null.  The same thing
>  happens if I turn on the autopilot in flight by using the joystick to change 
> the /autopilot/CENTURYIII/controls properties through a script.
>
> Is there a general file and scripting structure that it is recommended to 
> follow for implementing aircraft?  It's very challenging to learn to 
> understand and modify aircraft implementations when the general arrangement 
> of files is so different from one to the next.
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to