September 15, 201312 yr Author I'm using a.XML editor and if spaces are needed it advices me. Gianfranco
September 15, 201312 yr OK, For fun tested your code and this works perfect: <Element> <Position X="0" Y="200" /> <Select> <Value> (A:sim on ground,bool) ! if{ (A:GPS WP ETE, minutes) 2 < (A:GPS IS ACTIVE WAY POINT,bool) (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > and and if{ 1 } els{ 0 } } els{ 0 } </Value> <Case Value="0"><Image Name="wpt Alert1.bmp" Bright="yes"/></Case> <Case Value="1"><Image Name="wpt Alert2.bmp" Bright="yes"/></Case> </Select> </Element> Jan "Beatus ille qui procul negotiis..."
September 15, 201312 yr Author Hi Jan, your corrections to the code have been the right solution. Now the ALERT Light on my HSI works properly on ground and in flight. Thank you very much indeed. Gianfranco
September 16, 201312 yr Moderator In that case then, let me repost the XML script the correct way for posterity: <Element> <Position X="0" Y="200" /> <Select> <Value> (A:sim on ground,bool) ! if{ (A:GPS WP ETE, minutes) 2 < (A:GPS IS ACTIVE WAY POINT,bool) (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > and and if{ 1 } els{ 0 } } els{ 0 } </Value> <Case Value="0"> <Image Name="wpt Alert1.bmp" Bright="yes"/> </Case> <Case Value="1"> <Image Name="wpt Alert2.bmp" Bright="yes"/> </Case> </Select> </Element> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 16, 201312 yr Author Bill, that's the right code .I would like to know ,just for learning, the why of code after " and and ". Please explain to me. Thanks Gianfranco
September 17, 201312 yr Hi, (A:sim on ground,bool) !if{ (A:GPS WP ETE, minutes) 2 <(A:GPS IS ACTIVE WAY POINT,bool)(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >and and if{ 1 } els{ 0 } }els{ 0 } A translation: If airborne (A:sim on ground,bool) !, then the value is "1", when the 3 arguments,(A:GPS WP ETE, minutes) 2 <(A:GPS IS ACTIVE WAY POINT,bool)(A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 >and and,are true.if not, one of the arguments is false, the value is "0". On the ground the value will be "0". Jan "Beatus ille qui procul negotiis..."
September 17, 201312 yr Simply out of interest, what value does (A:GPS WP ETE, minutes) return with the aircraft on ground? Gerry Howard
September 17, 201312 yr Commercial Member Simply out of interest, what value does (A:GPS WP ETE, minutes) return with the aircraft on ground? Depends on if the aircraft is in motion or not. If it's in motion, it will return a value... hence the need to test for being airborne. Ed Wilson Mindstar AviationMy Playland - I69
September 17, 201312 yr Depends on if the aircraft is in motion or not. If it's in motion, it will return a value... hence the need to test for being airborne. What value does it return if the aircraft's in motion? Also what value does it return if the aircraft's airborne but not moving towards the waypoint? Gerry Howard
September 17, 201312 yr My observations ETE minutes: On the ground: "0" when parking brakes are on and "a whole lot" during taxiing. In the air: the amount of minutes to the waypoint and when holding the number increases on the outbound leg and decreases, of course, on the inbound leg. When moving in a circle around the wpt, so distance stays the same, the number of minutes remain even. Jan "Beatus ille qui procul negotiis..."
September 17, 201312 yr Could a "whole lot" be distance to way point divided by velocity component towards waypoint? Gerry Howard
September 17, 201312 yr Didn't calculate that, but probably "the whole lot" is the amount of minutes to get to the waypoint whatever direction one is moving, so i think you are right. (Time = Distance / Velocity) Jan "Beatus ille qui procul negotiis..."
September 18, 201312 yr YUP, Just to add, <Value> (A:sim on ground,bool) ! if{ (A:GPS WP ETE, minutes) 2 < (A:GPS IS ACTIVE WAY POINT,bool) (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > and and if{ 1 } els{ 0 } } els{ 0 } </Value> Is exactly as the same as - <Value> (A:sim on ground,bool) ! (A:GPS WP ETE, minutes) 2 < (A:GPS IS ACTIVE WAY POINT,bool) (A:ELECTRICAL AVIONICS BUS VOLTAGE, volts) 10 > and and and </Value> Just an example, as a lesson perse' , alternate ways to do the same thing. P.S. Anyone talk to Arne Bartels lately? FS RTWR SHRS F-111 JoinFS Little Navmap
September 18, 201312 yr Right, FTR, i use only: <Value>(A:GPS DRIVES NAV1,bool) (A:GPS WP ETE,minutes) 2 < and</Value> for obvious reasons. Jan "Beatus ille qui procul negotiis..."
September 18, 201312 yr Moderator Arne has been conspicuous by his absence now for about three years. I've tried several times to re-establish contact with him via email, but never got a reply. :( @Roman, you are quite correct. The only real "purpose" for using the { 1 } and { 0 } constructs is for ease of human understanding... :Nerd: Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment