April 30, 201115 yr What I've done is created special LVars to store ICAO's Hi,You are not actually storing ICAOs. Instead, your code stores four characters of Ident. There's an important difference, of course. Airport Idents can be 3 or 4 characters long, so I presume your code resets the LVars, or at least LVar4, before they are used again for another airport Ident, otherwise you will not be able to match a 3 character airport Ident.Right about LVars not being able to store strings... only numbers. But, LVars are signed 32 bit integers, so I believe you could store up to six (ascii decimal equivalent) characters into a single LVar using the xml bit operators >>, << if you really wanted. An FMC is an ambitious project ... good luck!!Bob
May 1, 201115 yr Hi,Had no results with the airways.They only show up with a msgps flightplan.Way around: It could be done with typing say UB2, which results in activating 2 or more enclosing waypoints, stored before in L:Var's.Now you're flying along the airway between the waypoints and UB2 is showing in the FMC under "VIA" and so on to the next airway etc...The problem is making a database of all airways which their waypoints ; and they cannot be saved......!Same for SID's and STAR's.Also sticking to the normal way of entering alternates in the fmc.Adapting all flightplans is a way too far.Jan Jan "Beatus ille qui procul negotiis..."
May 2, 201115 yr The problem is making a database of all airways which their waypoints ; and they cannot be saved......!Those of us stuck in low xml orbit could do some interesting things if there was a way to write and read numbers to a file. It would be fun to see how much further you could stretch utilization of the gps module.I'm certainly not up to the challenge of learning C++ where, I presume, that limitation doesn't exist.Bob
May 2, 201115 yr Author Commercial Member Those of us stuck in low xml orbit could do some interesting things if there was a way to write and read numbers to a file. It would be fun to see how much further you could stretch utilization of the gps module.I'm certainly not up to the challenge of learning C++ where, I presume, that limitation doesn't exist.BobBob, I recently purchased a great text book to learn C++, and I've been progressing along well. However, I have been really busy as of late working on my licenses and haven't had time to really program anything useful to us but I hope - once I get some free time - to develop a gauge that will allow the reading and creating of files with XML. Such as Doug Dawson's sound gauges.Jan, I've run into the same trouble and have yet to figure a way around this. If I get anything I'll be sure to post. This is a truly difficult task, and will take much time and will. Good Day, Engjell Berisha
May 20, 201115 yr Hi,Just "cosmetics", may be known since the middle ages but....To have those boxes in the FMC which should be filledin with data one can use instead of polygons or -lines this code:This one is for the POS page, but anything is possible; there are hidden spaces!.<Element><Position X="45" Y="45"/><Text X="265" Y="13" Bright="Yes" Length="30" Font="Arial" Color="@color" Adjust="right" VerticalAdjust="center" Multiline="NO"><String>°'" °'"</String></Text></Element>You need Text, Lenght and multiline="no"Each "return" gives a "box"Jan Jan "Beatus ille qui procul negotiis..."
May 21, 201115 yr Commercial Member <Element><Position X="45" Y="45"/><Text X="265" Y="13" Bright="Yes" Length="30" Font="Arial" Color="@color" Adjust="right" VerticalAdjust="center" Multiline="NO"><String>°'" °'"</String></Text></Element> Ed Wilson Mindstar AviationMy Playland - I69
May 21, 201115 yr Moderator Ed, I started to do just that this morning myself. It makes the script ever so much easier to see...Why folks refuse to use the # button to "wrap the code" is beyond me! Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
May 22, 201115 yr Nice one JanFor single squares I use.#<Element><Position X="45" Y="185"/><Text X="85" Y="23" Bright="Yes" Length="30" Font="Symbol" Color="White" Adjust="Left" VerticalAdjust="center" Multiline="no"><String>& # 1 2 7 ;</String></Text></Element>#String symbols have 1 space to allow squence to show here Paul EGLD
May 22, 201115 yr Hi,Found out that this one is working too, using formattedtext, arial and code, with spaces, & # 1 2 7 ; <Element><Position X="45" Y="30"/><FormattedText X="265" Y="230" Bright="Yes" Font="arial" FontSize="12" Color="#00ff00" LineSpacing="15" Tabs="15,25L,140C,255R,265R" Adjust="left" VerticalAdjust="center"><String>N ° ' "\nW ° ' "</String></FormattedText></Element> Makes live much more easier....Jan Jan "Beatus ille qui procul negotiis..."
May 22, 201115 yr Moderator Thanks for wrapping the script, Jan! I long ago adopted using <FormattedText> as my standard for all <String> display. It's so much more flexible, although sometimes figuring out the tabs is a bit of a head-scratcher! :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
May 22, 201115 yr Fr. Bill,Indeed, i use only FormattedText.Became more interested in the fmc cosmetics since this ongoing discussion.Knew about the trick with text and multiline; something to share.It was PVE who pointed my attention to just Text and the "Symbol" Font.To my surprise 127 worked also with Arial and FormattedText; this one was not mentioned in Roman's xml guide as a working symbol.Jan Jan "Beatus ille qui procul negotiis..."
May 22, 201115 yr Commercial Member <Element><Position X="45" Y="185"/><Text X="85" Y="23" Bright="Yes" Length="30" Font="Symbol" Color="White" Adjust="Left" VerticalAdjust="center" Multiline="no"><String>& # 1 2 7 ;</String></Text></Element> Ed Wilson Mindstar AviationMy Playland - I69
May 22, 201115 yr There is a problem with the shape of the square depending on the gauge size and screen res. and size used. I changed to wide screens and the Arial font did not work so experiment with fonts.Bill As you can see from my previous post I inserted the hash and still can't get the code wrap to work. Are mine the right color? Paul EGLD
May 23, 201115 yr Moderator Bill As you can see from my previous post I inserted the hash and still can't get the code wrap to work. Are mine the right color? Paul, you tried, but I forgot that with this new forum software, the Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
November 28, 201312 yr Author Commercial Member Haven't added much useful code to this in a long time. This doesn't exactly pertain to the original question but it is in the line of the Honeywell FMC. Below is a bit of code used in a rudimentary VNAV code I have created. It isn't the best working code but it does do the job and with a little bit of tweaking can be set to perform quit well in my opinion. <!--==================================VERTICAL-NAVIGATION==================================--> (L:PWR,bool) 1 == if{ (A:MAX GROSS WEIGHT,lbs) (A:EMPTY WEIGHT,lbs) - (>L:FMC-MAX-VAR-WT,number) (A:TOTAL WEIGHT,lbs) (A:EMPTY WEIGHT,lbs) - (>L:FMC-VAR-WT,number) (L:FMC-VAR-WT,number) (L:FMC-MAX-VAR-WT,number) / 100 * (>L:FMC-VAR-WT-LOAD,number) (A:INDICATED ALTITUDE,feet) (L:FMC-RTE-DEST-ELEV,number) - (>L:FMC-VNAV-ALT-DIF,number) (L:FMC-VNAV-ALT-DIF,number) 1000 / 2.8 * 10 + (>L:FMC-VNAV-DES-DST,number) (L:FMC-PERF-CRZ-ALT,feet) (>L:FMC-VNAV-CRZ-ALT,number) <!--=====ECONOMY SPEED=====--> (L:FMC-PERF-CI,number) 0.02 * 280 + 250 max 330 min (>L:FMC-VNAV-ECON-KIAS,number) (L:FMC-PERF-CI,number) 0.002 * 78 + 77 max 82 min (>L:FMC-VNAV-ECON-MACH,number) (L:FMC-VNAV-SEL-KIAS,number) 100 > (L:FMC-VNAV-SEL-MACH,number) 0 == and if{ 750 (>L:FMC-VNAV-SEL-MACH,number) } (L:FMC-VNAV-SEL-KIAS,number) 0 == (L:FMC-VNAV-SEL-MACH,number) 700 > and if{ 250 (>L:FMC-VNAV-SEL-KIAS,number) } <!--=====OPTIMUM & MAXIMUM ALTITUDE=====--> 43100 (L:FMC-VAR-WT-LOAD,number) 142 * - (>L:FMC-VNAV-OPT-ALT,number) (L:FMC-VNAV-OPT-ALT,number) 4000 + (>L:FMC-VNAV-MAX-ALT,number) <!--=====SPEED & POWER CORRECTION=====--> (A:AUTOPILOT AIRSPEED HOLD,bool) 1 == if{ (A:AIRSPEED INDICATED,knots) (A:AUTOPILOT AIRSPEED HOLD VAR,knots) - 100 * (>L:FMC-VNAV-SPD-CORR,number) } (A:AUTOPILOT MACH HOLD,bool) 1 == if{ (A:AIRSPEED MACH,machs) (A:AUTOPILOT MACH HOLD VAR,machs) - 10000 * (>L:FMC-VNAV-SPD-CORR,number) } (L:THR-LVRS-POS,number) 90 >= 95 < if{ (L:THR-LVRS-POS,number) 90 - 150 * -1 * (L:FMC-VNAV-DTHR-CORR,number) - -2000 max 2000 min (>L:FMC-VNAV-THR-CORR,number) } (L:THR-LVRS-POS,number) 95 >= if{ (L:THR-LVRS-POS,number) 90 - 200 * -1 * (L:FMC-VNAV-DTHR-CORR,number) - -2000 max 2000 min (>L:FMC-VNAV-THR-CORR,number) } (L:THR-LVRS-POS,number) 95 >= (G:Var3) 0 == (G:Var5) 0 == and and if{ (P:ZULU TIME,seconds) (>G:Var1) } (L:THR-LVRS-POS,number) 95 >= (G:Var4) 0 == and if{ (P:ZULU TIME,seconds) (G:Var1) - (>G:Var2) 1 (>G:Var3) } (G:Var2) 4 > if{ 1 (>G:Var4) } els{ 0 (>G:Var4) } (L:THR-LVRS-POS,number) 95 < if{ 0 (>G:Var1) 0 (>G:Var2) 0 (>G:Var3) } (G:Var2) 10 >= if{ (G:Var2) 10 * -2500 max 2500 min (>L:FMC-VNAV-DTHR-CORR,number) } (L:FMC-VNAV-VAR1,number) 0 == if{ (P:ZULU TIME,seconds) (>L:FMC-VNAV-VAR1,number) } (P:ZULU TIME,seconds) (L:FMC-VNAV-VAR1,number) - (>L:FMC-VNAV-TIMER,number) <!--=====CLIMB=====--> (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 1000 > if{ (L:FMC-VAR-WT-LOAD,number) -25 * 4000 + int (L:FMC-VNAV-SPD-CORR,number) + (L:FMC-VNAV-THR-CORR,number) + 0 max 4000 min (>L:FMC-VNAV-CVS,number) } <!--=====DESCENT=====--> (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - -1000 < if{ (L:FMC-VAR-WT-LOAD,number) -25 * 4000 + /-/ int (L:FMC-VNAV-SPD-CORR,number) + -4000 max 0 min (>L:FMC-VNAV-CVS,number) } <!--=====VNAV MODE SET=====--> (L:VNAV-MODE,enum) 1 < if{ 1 (>L:VNAV-MODE,enum) } (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 1000 > if{ 1 (>L:VNAV-MODE,enum) } (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - -1000 > (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 1000 < and if{ 2 (>L:VNAV-MODE,enum) } (L:FMC-VNAV-DES-NOW,enum) 1 == if{ 3 (>L:VNAV-MODE,enum) } els{ (A:GPS FLIGHT PLAN WP Count,number) 0 != if{ (A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles) (L:FMC-VNAV-DES-DST,number) <= if{ 3 (>L:VNAV-MODE,enum) } } els{ 3 (>L:VNAV-MODE,enum) } } } <!--==========END-VNAV-CALCULATIONS==========--> Next is the code that applies all the calculations above: <!--========================VERTICAL-NAVIGATION========================--> (L:VNAV,bool) 1 == if{ (A:AUTOPILOT ALTITUDE LOCK,bool) 0 == if{ (>K:AP_PANEL_ALTITUDE_ON) } <!--==========CLIMB-MODE==========--> (L:VNAV-MODE,enum) 1 == if{ (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 1000 > if{ (L:FMC-VNAV-CVS,number) -4000 max 4000 min (>K:AP_VS_VAR_SET_ENGLISH) } els{ (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 2 * -800 max 800 min (>K:AP_VS_VAR_SET_ENGLISH) } (L:MCP-ALTITUDE,feet) (>K:AP_ALT_VAR_SET_ENGLISH) (A:INDICATED ALTITUDE,feet) 27000 > if{ (A:AUTOPILOT MACH HOLD,bool) 0 == if{ (>K:AP_MACH_ON) 1 (>L:MACH-IAS,bool) } (L:FMC-VNAV-SEL-MACH,number) 0 == if{ (L:FMC-VNAV-ECON-MACH,number) } els{ (L:FMC-VNAV-SEL-MACH,number) 10 / } (>K:AP_MACH_VAR_SET) } els{ (A:AUTOPILOT AIRSPEED HOLD,bool) 0 == if{ (>K:AP_PANEL_SPEED_ON) } (A:INDICATED ALTITUDE,feet) 10000 < if{ (A:AUTOPILOT AIRSPEED HOLD VAR,knots) 250 != if{ 250 (>K:AP_SPD_VAR_SET) } } (A:INDICATED ALTITUDE,feet) 10000 > if{ (L:FMC-VNAV-SEL-KIAS,number) 0 == if{ (L:FMC-VNAV-ECON-KIAS,number) } els{ (L:FMC-VNAV-SEL-KIAS,number) } (>K:AP_SPD_VAR_SET) } } } <!--==========CRUISE-MODE==========--> (L:VNAV-MODE,enum) 2 == if{ (L:FMC-VNAV-CRZ-ALT,number) (>K:AP_ALT_VAR_SET_ENGLISH) (A:INDICATED ALTITUDE,feet) 27000 > if{ (A:AUTOPILOT MACH HOLD,bool) 0 == if{ (>K:AP_MACH_ON) 1 (>L:MACH-IAS,bool) } (L:FMC-VNAV-SEL-MACH,number) 0 == if{ (L:FMC-VNAV-ECON-MACH,number) } els{ (L:FMC-VNAV-SEL-MACH,number) 10 / } (>K:AP_MACH_VAR_SET) } els{ (A:AUTOPILOT AIRSPEED HOLD,bool) 0 == if{ (>K:AP_PANEL_SPEED_ON) } (A:INDICATED ALTITUDE,feet) 10000 < if{ (A:AUTOPILOT AIRSPEED HOLD VAR,knots) 250 != if{ 250 (>K:AP_SPD_VAR_SET) } } (A:INDICATED ALTITUDE,feet) 10000 > if{ (L:FMC-VNAV-SEL-KIAS,number) 0 == if{ (L:FMC-VNAV-ECON-KIAS,number) } els{ (L:FMC-VNAV-SEL-KIAS,number) } (>K:AP_SPD_VAR_SET) } } } <!--==========DESCENT-MODE==========--> (L:VNAV-MODE,enum) 3 == if{ (L:MCP-ALTITUDE,feet) (>K:AP_ALT_VAR_SET_ENGLISH) (L:FMC-RTE-DEST-ELEV,number) 10000 <= (L:MCP-ALTITUDE,feet) 10000 <= (A:INDICATED ALTITUDE,feet) 11000 > (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) <= and and and if{ 11000 (>K:AP_ALT_VAR_SET_ENGLISH) } (A:INDICATED ALTITUDE,feet) 11000 > (A:INDICATED ALTITUDE,feet) 10000 < | if{ (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - -1000 < if{ (L:FMC-VNAV-CVS,number) -4000 max 4000 min (>K:AP_VS_VAR_SET_ENGLISH) } els{ (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - -150 > (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 150 < and if{ (L:MCP-ALTITUDE,feet) (A:INDICATED ALTITUDE,feet) - 4 * -800 max 800 min (>K:AP_VS_VAR_SET_ENGLISH) } } (A:INDICATED ALTITUDE,feet) 27000 > if{ (A:AUTOPILOT MACH HOLD,bool) 0 == if{ (>K:AP_MACH_ON) 1 (>L:MACH-IAS,bool) } (L:FMC-VNAV-SEL-MACH,number) 0 == if{ (L:FMC-VNAV-ECON-MACH,number) } els{ (L:FMC-VNAV-SEL-MACH,number) 10 / } (>K:AP_MACH_VAR_SET) } els{ (A:AUTOPILOT AIRSPEED HOLD,bool) 0 == if{ (>K:AP_PANEL_SPEED_ON) 0 (>L:MACH-IAS,bool) } (A:INDICATED ALTITUDE,feet) 10000 < if{ (A:AUTOPILOT AIRSPEED HOLD VAR,knots) 240 != if{ 240 (>K:AP_SPD_VAR_SET) } } (A:INDICATED ALTITUDE,feet) 10000 > if{ (L:FMC-VNAV-SEL-KIAS,number) 0 == if{ (L:FMC-VNAV-ECON-KIAS,number) } els{ (L:FMC-VNAV-SEL-KIAS,number) } (>K:AP_SPD_VAR_SET) } } } (A:INDICATED ALTITUDE,feet) 11000 < (A:INDICATED ALTITUDE,feet) 10000 > and if{ -500 (>K:AP_VS_VAR_SET_ENGLISH) (A:AUTOPILOT AIRSPEED HOLD,bool) 0 == if{ (>K:AP_PANEL_SPEED_ON) } (A:AUTOPILOT AIRSPEED HOLD VAR,knots) 240 != if{ 240 (>K:AP_SPD_VAR_SET) } } } } <!--==========END-VNAV==========--> I might post some more code later on as I decided on what to post. Have had a lot of updates since this thread just not sure which is relevant to everyone else and would be of use. Hopefully this is helpful to at least one other person. Good Day, Engjell Berisha
Create an account or sign in to comment