Archived

This topic is now archived and is closed to further replies.

Wightleal

Auto prop pitch gauge

Recommended Posts

Hi,This is my first post - hope someone can help. I need an XML gauge to automatically set prop pitch to high whenever the flaps are in the zero (fully retracted) position. I've tried a few bits of code like:%(A:FLAPS HANDLE INDEX,number) 0 == %(>K:AXIS_PROPELLOR_SET=13763) %(>K:AXIS_PROPELLOR_SET=16384)%but no joy. It may be because the accompanying syntax is wrong.I'm new to XML, and would appreciate a bit of coaching!

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,This is my first post - hope someone can help. I need an XML gauge to automatically set prop pitch to high whenever the flaps are in the zero (fully retracted) position. I've tried a few bits of code like:%(A:FLAPS HANDLE INDEX,number) 0 == %(>K:AXIS_PROPELLOR_SET=13763) %(>K:AXIS_PROPELLOR_SET=16384)%but no joy. It may be because the accompanying syntax is wrong.I'm new to XML, and would appreciate a bit of coaching!
First, this question really belongs in the "Aircraft and Panel Design" forum, because that's where XML gauge scripting is covered.Second, your syntax is completely incorrect:
(A:FLAPS HANDLE INDEX,number) 0 ==  	 if{ 16384 (>K:AXIS_PROPELLOR_SET)

XML scripting uses "Reverse Polish Notation" (RPN). The prototype for all conditional commands is:

(Condition) if{ (>K:DoSomething) }

In "normal forward notation" this is:

if (Condition) is TRUE then (>K:DoSomething)

Share this post


Link to post
Share on other sites

I told you I was new! Many thanks for your prompt response - I remember RPN now from college 100 years ago! I haven't made it work yet, but I've started my revision course.

Share this post


Link to post
Share on other sites