FSXA Glide Slope Alert

#1
Ok im on the last one, and of course it's beyond me. Cant figure out the relationship with the -1. Would like this annunciator to "beep" once every time below glideslop annun activitates. Please Help....

Code:
<Gauge Name="Glide Slope Indicator" Version="1.0">
<Update Hidden="Yes">(A:HSI GSI needle, number) 0 &gt;
(L:PlayOnce,bool) -1 == and
if{ 1 (&gt;L:dsd_fsx_sound_id_00,number) 
-1 (&gt;L:PlayOnce,bool) }
(A:HSI GSI needle, number) 0 ==
(L:PlayOnce,bool) -1 == and
if{ 0 (&gt;L:PlayOnce,bool) }
</Update>
<Element>
<Select>
 <Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 20 / </Value>
<Case Value="-1">
<Image Name="Below_gs_On.bmp" Bright="Yes"/>
</Case>
<Case Value="0">
<Image Name="Below_gs_Off1.bmp" Bright="Yes"/>
</Case>
<Case Value="1">
<Image Name="Below_gs_Off.bmp" Bright="Yes"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="118" Height="59">
<Cursor Type="Hand"/>
<Tooltip>Below Glideslope</Tooltip>
</Area>
</Mouse>
</Gauge>
 
#2
Relationship with neg values

Can someone explain the relationship when using negative values. I cant figure out why it adding -1 value will not be reconized. Thanks
Greg
 

n4gix

Resource contributor
#3
That variable has a return of (+/- 119), not (+/- 1)!

Change your script to be:

Code:
<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 119 / </Value>
This will scale the output to be -1, 0, 1...

For the <Update> section, you'll also have to properly rescale the variable and fix the logic:

Code:
<Update Hidden="Yes">
  (A:HSI GSI needle, number) 119 / 0 &lt;
  (L:PlayOnce,bool) 0 == and
  if{ 
    1 (&gt;L:dsd_fsx_sound_id_00,number)
    1 (&gt;L:PlayOnce,bool)
    }
  (A:HSI GSI needle, number) 119 / 0 &gt;=
  (L:PlayOnce,bool) -1 == and
  if{ 0 (&gt;L:PlayOnce,bool) }
</Update>
 
Last edited:
#4
Thank you so much Bill

Thanks Bill, getting closer. still working the gauge. As of now it beeps randomly and wont reset. Am tweaking to get it working properly, and feel im close. Will post the final result when completed. Thanks for everyones help with these annnunuciators.

Greg
 
#5
Well, this ended up the route to make it work

Well thanks everyone, i dont know how or why, but this ended up working the way i wanted it to. Thanks again.

Greg

Code:
<Gauge Name="Glide Slope Indicator" Version="1.0">
<Update Hidden="Yes">(A:HSI GSI needle, number) 119 / 0 &gt;= 
(L:PlayOnce26,bool) 1 == and if{ 0 (&gt;L:PlayOnce26,bool) }</Update>
<Element>
<Select>
<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 119 / </Value>
<Case Value="-1">
<Image Name="Below_gs_On.bmp" Bright="Yes"/>
</Case>
<Case Value="0">
<Image Name="Below_gs_Off.bmp"/>
<Case Value="1">
<Image Name="Below_gs_Off.bmp"/>
</Case>
</Case>
</Select>
</Element>
 <Element>
 <Select>
 <Value>(A:HSI GSI needle, number) 119 / 0 &lt; (L:PlayOnce26,bool) 0 == and if{ 1 (&gt;L:dsd_fsx_sound_id_26,number) 1 
(&gt;L:PlayOnce26,bool) }</Value>
</Select>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="118" Height="59">
<Cursor Type="Hand"/>
<Tooltip>Below Glideslope</Tooltip>
</Area>
</Mouse>
</Gauge>
 
Top