Sign in to follow this  
Au MaV

Announciator design

Recommended Posts

Dear All,I am about start with an announciator as part of the primary flight display.What I have been thinking of is to use a case based var but found that its hard to find all the different scenarios so the annonciator is showing the right mode when changes occur.Another way would be to use if true text statements to show the mode.Any one with of experience of designing and coding this kind of logic in xml that has experiences to share which way to go?Kind regardsEugen

Share this post


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

Eugen,System malfuntions, advisory's, cautions and warnings like: L CTR FUELPUMP, C HYD SYS PRESS etc.or MCP, Flightmodes, like: AP, ALT HOLD, VNAV etc.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

In that case this could be an example:%((L:vnav,enum) 1 == (A:VERTICAL SPEED,ft/min) abs 100 < and)%{if}VNAV%{else}%((L:vs,enum) 1 ==)%{if}VS%{else}%((A:RADIO HEIGHT,feet) 500 > (L:vnav,enum) 0 == (L:flch,enum) 0 == (A:Autopilot altitude lock,bool) and and and)%{if}ALT HOLD%{else}%((L:vnav,enum) 1 == (A:VERTICAL SPEED,ft/min) abs 100 > and)%{if}VNAV PTH%{else}%((L:n1ref,enum) 0 == (L:flch,enum) 0 == ! and)%{if}FLCH%{end}You see, 5 diff vert modes in one string (of course own L:var's!) A good trick is to change the color or background color when there is an armed and active mode.Like here:%((A:Autopilot approach hold, bool) (A:NAV1 signal,bool) (A:RADIO HEIGHT,feet) 100 > and and)%{if}G/SJan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

I'm an old if/else freak :-) I do my annunciator stuff in C++, but it is all done in the if/else style. Here a C++ example to operate the Pitot Heat Warning lamp://-------------------------------------------------------------------FLOAT64 FSAPI pitot_cb ( PELEMENT_ICON pelement ){ FLOAT64 val = pelement->source_var.var_value.n; if (counter == 0) { if (pelement->source_var.var_value.n == FALSE) { //HIDE_IMAGE(&icon_pitot); if (pitot_send == 0) pitot_send = 1;// sends signal for Master Caution lamp to blink } else { //SHOW_IMAGE(&icon_pitot); if (pitot_send == 2) pitot_send = 0;// resets signal for Master Caution } } return FALSE;}//------------------------------------------------------------------I get the state of the pitot heat switch via a MAKE_ICON callback and assign it to the FLOAT64 val. counter is a variable to do with the annunciator test button which - in case it is currently depressed - will light all annunciator lights to check if all the bulbs still work. The normal annunciator logic will only come online when the test procedure has come to an end which returns counter to 0.pitot_send is the variable that controls what the pitot heat annunciator light does as well as the Master caution light. The actual image is hidden in the PANEL_SERVICE_PRE_UPDATE: section. In my case I hide the lit up anunciator lights located in a background image with unlit dummies so I can have a bright and dim light setting simply by replacing the background pic.pitot_send is set to 2 once the Master Caution light has begun to blink thus alerting the pitot heat annunciator light to turn off again as soon as the callback gets the news to do so.I know this isn't xml but hope it might give some ideas, though my annunciator system is of the old-fashioned kind...

Share this post


Link to post
Share on other sites

Also, if you find difficult/annoying to code %{if}%{else}% etc in strings structures, or need to reference the same vars several times, you may as well use macros like ((A:RADIO HEIGHT,feet) 500 > (L:vnav,enum) 0 == (L:flch,enum) 0 == (A:Autopilot altitude lock,bool) and and and if{ 'ALT HOLD' sp0 } (L:vnav,enum) 1 == (A:VERTICAL SPEED,ft/min) abs 100 > and if{ 'VNAV PTH' sp0 } etc... l0Then %(@Mac1)%!s! or even use registers directly ((A:RADIO HEIGHT,feet) 500 > ...etc if{ 'ALT HOLD' sp0 } etc...Then %(l0)%!s!Tom

Share this post


Link to post
Share on other sites

Me I just cribed from the default 747-400.cab EICAS Display.xml :)Wozza(L:Displayed warn, mask) 0 ==%(0 (A:Fuel selected quantity percent, percent) 10 < 0 << | (A:GEAR RIGHT POSITION,position) 0 == ! (A:Airspeed select indicated or true, knots) 150 > && 1 << | (A:Stall warning, bool) 3 << | (A:Radio height, feet) s0 200 < (A:Airspeed select indicated or true, knots) 250 > && 2 << | d s0 (>L:Current cautions, mask) (L:Displayed cautions, mask) ~ & s1 if{ l1 (>L:Displayed caut, mask) } l0 (>L:Displayed cautions, mask) l0 (L:Displayed caut, mask) & s1 (>L:Displayed caut, mask))%(l1 4 &)%{if}Too low terrain%{else}%(l1 2 &)%{if}Gear%{else}%(l1 1 &)%{if}Fuel low%{else}%(l1 3 &)%{if}Stall%{end}%{end}%{end}%{end}(L:Current cautions, mask) s0 (L:Acq cautions, mask) s1 & (>L:Acq cautions, mask) l0 l1 ~ & 0 != (L:TEST,bool) || Master Warning

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this