Moving along with my Nav Radar guage and hit another stumbling block. Find working with code enjoyable, but a headache as well.
So the problem, which has me completly baffled. Dave Wave has created a squawk ident feature in the FSX ATC Radar, which works amazingly well. You hit the button and on the ATC Radar turns red for easy identification.
The Squawk Ident Code:
This attaches to your radio stack so you can ident when required at the press of a button. Alternatly you can squawk 0000 for the same effect.
This is the update from the modified section of the ATC session info XML:
The original update (located at the top) still intack in both guage files
The add-on update (located at the bottom) in same XML:
Talking with Dave Wave, he stated in order to have my guage read the squawk ident i need to:
This is what i came up with, but dont know how to have it activiate the macro (if i need to) and unsure if the code even is sound.
Any help and advice is alway appreaciated. Thanks you all in advance.
Greg
So the problem, which has me completly baffled. Dave Wave has created a squawk ident feature in the FSX ATC Radar, which works amazingly well. You hit the button and on the ATC Radar turns red for easy identification.
The Squawk Ident Code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document
Type="AceXML"
version="1,0"
id="xponder">
<Descr>AceXML Document</Descr>
<Filename>Ident.xml</Filename>
<SimGauge.Gauge id="Gauge" ArtDirectory="C:\Documents and Settings\DaveHirst\Desktop\Xponder">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>15,15</Size>
<Element id="Element">
<FloatPosition>0.000,0.000</FloatPosition>
<Circle id="Circle">
<Bright>True</Bright>
<Radius>7</Radius>
<FillColorScript>@IdentColour</FillColorScript>
<LineWidth>2</LineWidth>
<LineColor>0x444444</LineColor>
</Circle>
</Element>
<MouseArea id="MouseArea">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>14,14</Size>
<MouseArea id="Ident">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>14,14</Size>
<CursorType>Hand</CursorType>
<MouseClick id="MouseClick">
<Script>(L:IdentPushed) 0 > if{ quit }
(A:TRANSPONDER CODE:1,BCO16) (>L:TempSquawk,BCO16)
0 (>K:XPNDR_SET)
1 (>L:IdentPushed)</Script>
</MouseClick>
</MouseArea>
</MouseArea>
<Update id="Update">
<Frequency>1</Frequency>
<Script>(L:LocalSquawk,BCO16) (A:TRANSPONDER CODE:1,BCO16) != if{
(A:TRANSPONDER CODE:1,BCO16) (>K:XPNDR_SET)
(A:TRANSPONDER CODE:1,BCO16) (>L:LocalSquawk,BCO16) }
(L:IdentPushed,number) 0 > if{ (L:IdentPushed) ++ (>L:IdentPushed) }
(L:IdentPushed,number) 5 > if{ 0 (>L:IdentPushed) (L:TempSquawk,BCO16) (>K:XPNDR_SET) }
</Script>
</Update>
<Macro id="IdentColour" Name="IdentColour">
<MacroValue>(L:IdentPushed) 0 == if{ 0xff3333 } els{ 0x0000ff }</MacroValue>
</Macro>
<Comment id="Comment">
<Value>Any comments please email me at Davethewave2@hotmail.co.uk</Value>
</Comment>
</SimGauge.Gauge>
</SimBase.Document>
This attaches to your radio stack so you can ident when required at the press of a button. Alternatly you can squawk 0000 for the same effect.
This is the update from the modified section of the ATC session info XML:
The original update (located at the top) still intack in both guage files
Code:
<Update id="Update">
<Script>(L:SessionInfoInit) 0 ==
(L:Filter) 0 == and if{
25 (>L:Filter)
1 (>L:SessionInfoInit)
}
(L:ListFirstVis) (C:ITrafficInfo:ListSize) min (>L:ListFirstVis)
(C:ITrafficInfo:SelectedVehicleID) (>L:SelectedVehicle)
1607 3000 * (>C:ITrafficInfo:Radius) (* 3000 miles *)</Script>
</Update>
The add-on update (located at the bottom) in same XML:
Code:
<Update id="SquawkIdent">
<Script>quit
0 (>C:ITrafficInfo:Filter)
(C:ITrafficInfo:ListSize) (>G:Var1)
(G:Var1) 0 == if{ quit }
(G:Var1) -- (>G:Var1)
:1
(G:Var1) (>C:ITrafficInfo:CurrentVehicle)
(G:Var1) (>C:ITrafficInfo:SelectedVehicle)
(C:ITrafficInfo:S:TRANSPONDER CODE, number) 0 == if{ (C:ITrafficInfo:SelectedVehicleID) (>C:fs9gps:1:SelectedVehicle) }
(G:Var1) -- (>G:Var1)
(G:Var1) -1 == if{ quit }
g1</Script>
</Update>
Talking with Dave Wave, he stated in order to have my guage read the squawk ident i need to:
Code:
Squawk ident, either with pilot assistant or the add in to the com stack, works be setting the transponder to 0000 for 5 seconds.
Just code your gauge to detect that and that’s it.
Dave
This is what i came up with, but dont know how to have it activiate the macro (if i need to) and unsure if the code even is sound.
Code:
<Macro id="TARGETIDENT" Name="TARGETIDENT">
<MacroValue>(C:ITrafficInfo:C:TRANSPONDER CODE, number) 0 ==
if{ (C:ITrafficInfo:SelectedVehicle) (>G:Var1) (C:ITrafficInfo:CurrentVehicle)
(>C:ITrafficInfo:SelectedVehicle) (C:ITrafficInfo:SelectedVehicleID)
(>C:fs9gps:1:SelectedVehicle) (G:Var1) (>C:ITrafficInfo:SelectedVehicle) } )</MacroValue>
</Macro>
Any help and advice is alway appreaciated. Thanks you all in advance.
Greg


