March 2, 201115 yr Moderator Mai bpen rai, khrabThat appears to be Welsh, but literal translation has no real sense:That the head of some, khrab Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 3, 201115 yr That appears to be Welsh, but literal translation has no real sense:That the head of some, khrabHahahaha .... no, definitely not Welsh. It's a common Thai saying for don't mention it, not a problem, never mind. Khrab is added at the end for politeness.
March 3, 201115 yr Moderator Hahahaha .... no, definitely not Welsh. It's a common Thai saying for don't mention it, not a problem, never mind. Khrab is added at the end for politeness.Ah so! I wasn't expecting phonetic spelling... :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 6, 201115 yr Author Commercial Member Hmmm. Display - if someone is going to be working with the gps module, then they really need to know the Element display loop - there's a good example 12 posts up in this thread, and many more in the gps_500 gauge. Selection - re-read you own COM1 Ident thread for a place to start, and dig harder.Thai - Me: "Good luck:Bill: literally "Thank you for your best wishes of good luck" (not bad, Bill !)Me: "Don't mention it"Alright, so I've done as you suggested and ended up creating a gauge to help me read the ICAO stuff. I studied the function of the FS9GPS 500 but I can not figure out how it's doing some of the things as it uses unpublished variables for which I don't know why I would need them or for what. Variables such as: (@g:popupMenu) - Now when this value equals 10 I know that the Direct To "DUPLICATE WAYPOINTS" page will display. I need to create something like this, if there is an instance for which there will be two or more waypoints with the same ICAO I need to be able to see all the option, and be able to select one. I am sure there is a logical and not so loopy way of doing this as the GPS_500 seems to do. I can not make any sense of what variables are doing.Here is the gauge I modified from your original:<Gauge Name="TEST"><Size X="600" Y="300" /><Update Hidden="Yes" Frequency="10" > (@c:IcaoSearchCurrentIcao) (>@c:WaypointAirportICAO) (@c:IcaoSearchCurrentIcao) (>@c:WaypointIntersectionICAO) (@c:IcaoSearchCurrentIcao) (>@c:WaypointNdbICAO) (@c:IcaoSearchCurrentIcao) (>@c:WaypointVorICAO) (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) 'AVNWM' (>@c:IcaoSearchStartCursor) (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr (L:FMC-UNIT-6,number) chr scat scat scat scat scat (>@c:IcaoSearchEnterChar)</Update><Macro Name="c">C:fs9gps</Macro><Macro Name="C">C:fs9gps</Macro><Element Name="BACKGROUND RECTANGLE"><Position X="0" Y="0"/><Rectangle Width="800" Height="300" FillColor="Black" Bright="Yes" /></Element><Element Name="FLIGHT PLAN DISPLAY"> <Position X="0" Y="10"/><FormattedText X="1000" Y="800" Font="Verdana" FontSize="15" LineSpacing="17" Color="White" Bright="Yes" Tabs="10,10L,35,100,150,200,275,340,420L,470L" Adjust="Left"><Color Value="Blue"/><Color Value="darkgreen"/><String>\{clr2}FLIGHT PLAN\n\n\{clr3}TITLE: %((@c:FlightPlanTitle))%!s!\nWPTS: %((@c:FlightPlanWaypointsNumber))%!2d!% ACT: %((@c:FlightPlanIsActiveFlightPlan))%!2d!\n\{clr2}----------------------------- DATA -------------------------------\n%#\tIDENT\tALT\tTYPE\tHDG\tLAT\tLON\tDIST\tTTL\n%((@c:FlightPlanWaypointsNumber) s2 0 !=)%{if}%(0 sp1)%{loop}%(l1 (>@c:FlightPlanWaypointIndex))\{clr}%((@c:FlightPlanWaypointIndex))%!-3d!\t%((@c:FlightPlanWaypointIdent))%!s!\t%((@c:FlightPlanWaypointAltitude,feet))%!5d!\t%((@c:FlightPlanWaypointType))%!5d!\t%((@c:FlightPlanWaypointMagneticHeading, degrees))%!3d!\t%((@c:FlightPlanWaypointLatitude,degrees))%!3.2f!\t%((@c:FlightPlanWaypointLongitude,degrees))%!3.2f!\t%((@c:FlightPlanWaypointDistance,nmiles))%!4.1f!\t%((@c:FlightPlanWaypointDistanceTotal,nmiles))%!5.1f!\n%(l1 ++ s1 l2 <)%{next}%{end}\{clr2}----------------------------- ICAO SEARCH -------------------------------\n\{clr}%{loop} %((@c:IcaoSearchCurrentIcao))%!s!\n%((@c:IcaoSearchCurrentIdent))%!s!\n%((@c:FacilityICAO,string))%!s!\n%((@c:IcaoSearchCurrentIcaoType))%!s!\n%((@c:IcaoSearchMatchedIcaosNumber))%!s!%{next}</String></FormattedText></Element><Element Name="TEXT-FIELD"><Position X="0" Y="250"/><Visible>(L:FMC-MSG-UNIT-1,number) 0 ==</Visible><FormattedText X="280" Y="230" Bright="Yes" Font="Calibri" FontSize="15" Adjust="Left" Color="%( (L:FMC-BRT,number) 0x7f + 0x100 * )%" LineSpacing="15" Tabs="15,25L,120C,265R,270R"><String>%((L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr (L:FMC-UNIT-6,number) chr (L:FMC-UNIT-7,number) chr (L:FMC-UNIT-8,number) chr (L:FMC-UNIT-9,number) chr (L:FMC-UNIT-10,number) chr (L:FMC-UNIT-11,number) chr (L:FMC-UNIT-12,number) chr (L:FMC-UNIT-13,number) chr (L:FMC-UNIT-14,number) chr (L:FMC-UNIT-15,number) chr (L:FMC-UNIT-16,number) chr (L:FMC-UNIT-17,number) chr (L:FMC-UNIT-18,number) chr (L:FMC-UNIT-19,number) chr (L:FMC-UNIT-20,number) chr (L:FMC-UNIT-21,number) chr (L:FMC-UNIT-22,number) chr (L:FMC-UNIT-23,number) chr (L:FMC-UNIT-24,number) chr scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat)%!s!</String></FormattedText> </Element><Keys> <On Key="AlphaNumeric"><Visible>(L:FMC-KEYBOARD-USE,bool) 1 ==</Visible>(M:Key) (>@c:IcaoSearchEnterChar)</On></Keys> </Gauge> The piece of code with the ICAO search and facilityicao variables will not work as I expect it to. It will only give me the numerical values of the string and only the first five numbers. I've tried using chr to correct it but nothing still. Some other bits in the gauge I borrowed from the GPS_500 to try and understand their purpose.Also, I noted this difference: when typing in the GPS Direct To page 'CKH' for example, my first result in the GPS is CKH or Koko Head VOR. But when using it on the FMC code (SEE RTE-ADD-WPT below) CKH will result in another airport or something. I thought because our startcursor letters were in different orders, but when reset to the same order nothing. <!--========================================RTE-ADD-WPT========================================--> (L:FMC-RTE-1,enum) 2 >= if{ (L:FMC-UNIT-3,number) 64 > (L:FMC-MSG-DEL-USE,bool) 0 == and if{ 'AVNWM' (>@c:IcaoSearchStartCursor) (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr (L:FMC-UNIT-6,number) chr scat scat scat scat scat (>@c:IcaoSearchEnterChar) (@c:IcaoSearchMatchedIcaosNumber) 1 >= if{ (@c:IcaoSearchCurrentICAO) (>@c:FlightPlanNewWaypointICAO) (@c:FlightPlanWaypointsNumber,number) 0 == if{ 1 (>@c:FlightPlanDirectToDestination) } els{ (L:FMC-RTE-1,enum) 2 - (>@c:FlightPlanAddWaypoint) } ' ' (>@c:IcaoSearchStartCursor) 1 (>L:FMC-UNIT-EMPTY,bool) quit } els{ 1 (>L:FMC-NOT-IN-DATABASE,bool) } } els{ (L:FMC-MSG-DEL-USE,bool) 1 == if{ (L:FMC-RTE-1,enum) 2 - 1 + (>@c:FlightPlanDeleteWaypoint) } els{ 1 (>L:FMC-INVALID-ENTRY,bool) } } quit } I know I've driven you guys crazy with my lack of understand for the GPS module, I thank you for helping me all this time! Good Day, Engjell Berisha
March 6, 201115 yr just a couple of quick things right now. You need chr after M:Key. Otherwise, you're attempting to enter numbers (that's what the keystrokes are) into a string. Use chr to convert the keystroke number to an ascii equivalent. EnterChar will only accept 5 characters max. The reason is that is the maximum length of any Ident in fs9gps database, and EnterChar is used for entering Idents needed for an ICAO search. If you exceed 5, then it will just replace the 5th character with the one just typed. The @g functions found in the gps_500 just make that particular gauge easier to code. They work with the gauge, not the gps module. You do not need any of them if you are building your own gauge that uses the gps.dll module. Yes, the gps_500 gauge is complex.
March 6, 201115 yr Author Commercial Member (L:FMC-UNIT-2,number) 0 != (L:FMC-UNIT-4,number) 0 == and if{ 'MNV' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-4,number) 0 != (L:FMC-UNIT-5,number) 0 == and if{ 'AW' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-5,number) 0 != (L:FMC-UNIT-6,number) 0 == and if{ 'W' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr scat scat scat scat (>@c:IcaoSearchEnterChar) I've used the above code and now it seems to be working much more consistently. I still don't understand how I can view all the matches though. In many cases - I've been actually searching them out to find out how they work - (@c:IcaoSearchMatchedIcaosNumber) will return 2 or more sometimes 6, and so I don't know how I would be able to view all the matches and select from them. I would assume I would have to transfer them to FacilityICAO perhaps and then from there I can list their LAT/LON. But I'm unsure of how to transfer all of them as I don't know how to view them. I've got the IcaoSearchMatchedIcao variable on my mind, but setting it will yield inconsistent results.I'll keep trying, thanks again bob.*EDIT* \t\tSELECT DESIRED WAYPOINT\t1 / 1%( (L:FMC-UNIT-2,number) 0 != (L:FMC-UNIT-4,number) 0 == and if{ 'MNV' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-4,number) 0 != (L:FMC-UNIT-5,number) 0 == and if{ 'AW' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-5,number) 0 != (L:FMC-UNIT-6,number) 0 == and if{ 'W' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-1,number) 0 != if{ (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr scat scat scat scat (>@c:IcaoSearchEnterChar) })\n\t%(0 (>@c:IcaoSearchMatchedIcao) (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO))%((@c:IcaoSearchCurrentIdent))%!s!\t\t%((@c:IcaoSearchCurrentIcaoType) ord)%{case}%{:65}ARPT%{:87}WPT%{:78}NDB%{:86}VORDME%{end}\n\t\t\t%((@c:FacilityLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:FacilityLatitude) abs flr)%!02d!°%((@c:FacilityLatitude) /-/ (@c:FacilityLatitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!02.1f!%((@c:FacilityLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:FacilityLongitude) abs flr)%!03d!°%((@c:FacilityLongitude) /-/ (@c:FacilityLongitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!3.1f! I've almost got it! All that's left is to figure out some way to loop the above code to show information for all of the ICAO matches. I've tried using {loop} command but the facility variables don't seem to like that much so I may have to perhaps write a code that will use the type and then refer to the respective Waypoint variables.Oh well, all the more fun I suppose! Thank You everyone! Back to work. :( :( Good Day, Engjell Berisha
April 10, 201115 yr Hi,For Duplicate Waypoints try:For search:(+/-) button, left and right mouse knobdecrease(@c:IcaoSearchMatchedIcaosNumber) 1 > if{ (@c:IcaoSearchMatchedIcao) 0 > if{ (@c:IcaoSearchMatchedIcao) 1 - 0 max (>@c:IcaoSearchMatchedIcao) (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) quit } } increase(@c:IcaoSearchMatchedIcaosNumber) 1 > if{ (@c:IcaoSearchMatchedIcao) (@c:IcaoSearchMatchedIcaosNumber) < if{ (@c:IcaoSearchMatchedIcao) 1 + (>@c:IcaoSearchMatchedIcao) (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) quit} } Set FPL:Enter DEST and 0 (>L:dupl wpt counter,enum) !Then:(L:dupl wpt counter,enum) 1 + (>L:dupl wpt counter,enum) (@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO) (L:dupl wpt counter,enum) (>@c:FlightPlanAddWaypoint) 0 (>@c:FlightPlanIsActiveWaypointLocked) quit Hope it helps,Jan Jan "Beatus ille qui procul negotiis..."
April 18, 201115 yr EditHi,For a list of duplicate wpts try (works for me):read<Element Name="Duplicate WPT's list"><Visible> Your condition </Visible><FormattedText X="265" Y="230" Bright="Yes" Font="arial" FontSize="14" Color="#cccccc" LineSpacing="15" Tabs="15,265R" Adjust="left" VerticalAdjust="center"><String>\n\{lsp=35}%(your condition) 1 == (@c:IcaoSearchMatchedIcaosNumber) s2 0 > and)%{if}%((L:wpt counter,number) 12 - sp1)%{loop}%(l1 (>@c:IcaoSearchMatchedIcao))%((@c:IcaoSearchMatchedIcao))%!d! %((@c:IcaoSearchCurrentIdent))%!s! %('AWNVM' (@c:IcaoSearchCurrentIcaoType) ord schr)%{case}%{:0}AIRPORT%{:1}ISEC%{:2}NDB%{:3}VOR%{:4}MARKER%{end} %((@c:IcaoSearchCurrentIcaoRegion)) %!s!\n%(l1 ++ s1 l2 < l1 (L:wpt counter,number) 6 - < and)\n%{next}%{end}</String></FormattedText> </Element>Next and prev knobs:(Your condition) if{ (L:wpt counter,number) 6 + (@c:IcaoSearchMatchedIcaosNumber) 12 + min (>L:wpt counter,number) }(Your condition) if{ (L:wpt counter,number) 6 - 12 max (>L:wpt counter,number) }Hope it helps,Jan Jan "Beatus ille qui procul negotiis..."
April 19, 201115 yr Author Commercial Member EditHi,For a list of duplicate wpts try (works for me):read<Element Name="Duplicate WPT's list"><Visible> Your condition </Visible><FormattedText X="265" Y="230" Bright="Yes" Font="arial" FontSize="14" Color="#cccccc" LineSpacing="15" Tabs="15,265R" Adjust="left" VerticalAdjust="center"><String>\n\{lsp=35}%(your condition) 1 == (@c:IcaoSearchMatchedIcaosNumber) s2 0 > and)%{if}%((L:wpt counter,number) 12 - sp1)%{loop}%(l1 (>@c:IcaoSearchMatchedIcao))%((@c:IcaoSearchMatchedIcao))%!d! %((@c:IcaoSearchCurrentIdent))%!s! %('AWNVM' (@c:IcaoSearchCurrentIcaoType) ord schr)%{case}%{:0}AIRPORT%{:1}ISEC%{:2}NDB%{:3}VOR%{:4}MARKER%{end} %((@c:IcaoSearchCurrentIcaoRegion)) %!s!\n%(l1 ++ s1 l2 < l1 (L:wpt counter,number) 6 - < and)\n%{next}%{end}</String></FormattedText> </Element>Next and prev knobs:(Your condition) if{ (L:wpt counter,number) 6 + (@c:IcaoSearchMatchedIcaosNumber) 12 + min (>L:wpt counter,number) }(Your condition) if{ (L:wpt counter,number) 6 - 12 max (>L:wpt counter,number) }Hope it helps,JanHey Jan,I have a very similar code, and it works all well but I can not figure out any way to display the LAT/LON for each match. That's what I'm having trouble, now back to the drawing board. :Thinking:FYI, here's the code: <!--=================================================DESIRED-WAYPOINT=================================================--><Element Name="WPT-SEL 1"><Visible>(L:FMC-WPT-SEL,enum) 1 ==</Visible><FormattedText X="275" Y="230" Bright="Yes" Font="Calibri" FontSize="15" Adjust="left" Color="%( (L:FMC-BRT,number) 0x7f + 0x100 * )%" LineSpacing="15" Tabs="15,16L,55L,75L,265R,270R"><String>\t\tSELECT DESIRED WAYPOINT\t1 / 1%((L:FMC-WPT-SEL,enum) 1 ==)%{if}%( (L:FMC-UNIT-2,number) 0 != (L:FMC-UNIT-4,number) 0 == and if{ 'MNV' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-4,number) 0 != (L:FMC-UNIT-5,number) 0 == and if{ 'AW' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-5,number) 0 != (L:FMC-UNIT-6,number) 0 == and if{ 'W' (>@c:IcaoSearchStartCursor) } (L:FMC-UNIT-1,number) 0 != if{ (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr scat scat scat scat (>@c:IcaoSearchEnterChar) })%((@c:IcaoSearchMatchedIcaosNumber) s2)%(0 sp1)%{end}%{loop}%(l1 (>@c:IcaoSearchMatchedIcao))%((@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO))\n\t%((@c:IcaoSearchCurrentIdent))%!s!\t\t%((@c:IcaoSearchCurrentIcaoType) ord)%{case}%{:65}ARPT%{:87}WPT%{:78}NDB%{:86}VORDME%{end}\n\t\t\t%((@c:FacilityLatitude) 0 > if{ 'N' } els{ 'S' })%!s!%((@c:FacilityLatitude) abs flr)%!02d!°%((@c:FacilityLatitude) /-/ (@c:FacilityLatitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!02.1f!%((@c:FacilityLongitude) 0 > if{ 'E' } els{ 'W' })%!s!%((@c:FacilityLongitude) abs flr)%!03d!°%((@c:FacilityLongitude) /-/ (@c:FacilityLongitude) /-/ int - 60.019236934915036870791920487336 /-/ * abs)%!3.1f!%(l1 ++ s1 l2 <)%{next}</String></FormattedText><Clip Top="25" Bottom="225"/></Element> Good Day, Engjell Berisha
April 19, 201115 yr Some very quick thoughts:Maybe the issue is that you're attempting an ICAO Transfer ((@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO)) within a display Element loop. The ICAO Transfer is not single cycle whereas your display loop is. Consequently, my guess is that you only get a lat/lon for the first Facility. If you have not already done so, you might take a look at the Asynchronous Operation section of the fs9gps guidebook for a little more background. As an alternate approach, perhaps you could try building a loop using {if} statements that accommodate the timing of the ICAO Transfer in an Update section.Bob
April 19, 201115 yr That is the way, sometimes > 50 matches.....Another point about departure and destination:I am wrestling with a single-push multipurpose-operation button on the fmc (LSK L6)May be already known, but by exploring, using direct to, add- and delete wpt, it is possible, after setting the destination (2 wpt flightplan!), to erase wpt 0, plane position, and add instead your departure airport.PUSH 1 select destination.PUSH 2 enter destination and select now departure.PUSH 3 add departure and delete wpt 0 and select next wpt; EXEC button starts blinking.PUSH 4 add next waypoint and sect the next one..PUSH 5 id.etc.last PUSH, then press EXEC, blinking stops and information is send to different pages of the FMC and become funtional.Just fun!Jan Jan "Beatus ille qui procul negotiis..."
April 19, 201115 yr erase wpt 0, plane position, and add instead your departure airport.I've done that before. But then, where do you want the aircraft to go? Wpt 0 or 1?Bob
April 19, 201115 yr Well,To wpt 1.In this case setting destination and after that replacing wpt 0 with the departure and then entering all the waypoints in between is not the problem.It is off course also possible to add a realistic SID and STAR.The "struggle", the fun, is to make the proper code for the single push LSK L6 to write and enter the flplan and after that EXEC to send the info and commands.Jan Jan "Beatus ille qui procul negotiis..."
April 19, 201115 yr Hi JanIf you are a Boeing FMC.I use this In the route page.Key press 3 loading dep ICAO and clearing old 0 waypoint, copy Fplan waypoint total number to L:varWPnum you would have 2 at start of plan.Then add another way point (A:GPS FLIGHT PLAN WP INDEX,number) goes to 3 (A:GPS FLIGHT PLAN WP INDEX,number) L:varWPnum != puts the exec light on. Push the exec button (A:GPS FLIGHT PLAN WP INDEX,number) >L:varWPnum light goes out etc.The plan is added to legs page in the bckground.PVE Paul EGLD
April 20, 201115 yr Hi,Not able to test things at the moment, but it might be a good idea to use (A:GPS FLIGHT PLAN WP INDEX,number) instead of (@c :FlightPlanWaypointIndex), because the last one sometimes is very inconsistent.Also the L:Var's i use change unpredictable when correcting duplicate waypoints.Jan Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment