April 10, 200323 yr Hallo,1. Does anyone of you knows a "string", which gives the heading, bearing to a NAV-station?2. And is it possible to use this value, eg 312, in a SET command?Something like:1. ((A:NAV1 Radians, degrees))%!3d! or bearing etc.2. (A:.......) if{ (A:NAV1 Radians, degrees) >K:Heading Set } ?????????I am curious!Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 10, 200323 yr 1.<String>%((A:NAV1 Radial, degrees) 180 + 360 % )%!.0f!</String>2.(>K:HEADING_BUG_SET)Arne Bartels
April 10, 200323 yr Thanks Arne,To my surprise the next one will steer the plane to the facility.(A:NAV1 HAS NAV,bool) 1 == if{ (A:NAV1 radial, degrees) 180 + (>K:HEADING_BUG_SET) }Now looking for a way to automatically select the next frequency's after station passing, using my database with xml-navaids.Something with TOFROM etc.???????????(I try to make an XML-FMC)More questions will follow........Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 11, 200323 yr To-From has nothing to do with flying to and from a navaid, that is it is if you have also tuned the radial you are heading, and only for VORs, for ILSs it's useless. It might be possible somehow with calculating the distance and checking, if you approach or depart from a NAVAID or come near enough, DME is not sufficient for this purpose. Arne Bartels
April 11, 200323 yr Sure, but having OBS and Heading Set automatically, it could be possible (have to try of course) to use the a-var HSI To and From Flag to activate another frequency. In this case i don't need the DME.Let you know when succesfull.Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 11, 200323 yr Need advice.This works! (L:test, bool) 1 == (A:HSI TF flags, enum) 1 == (A:NAV1 HAS NAV,bool) 1 == && && if{ (A:NAV1 radial, degrees) 180 + (>K:HEADING_BUG_SET) (A:NAV1 radial, degrees) 180 + (>K:VOR1_SET) }(L:test, bool) 1 == (A:HSI TF flags, enum) 2 == && if{ (>K:HEADING_BUG_SET) }(L:test, bool) 1 == (A:HSI TF flags, enum) 2 == && if{ 112.10 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET) }(L:test, bool) 1 == (A:HSI TF flags, enum) 2 == && if{ 114.20 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET) }etc etcIn other words: enroute, after station passage, frequency and obs change automatically and the plane heads to the next vor (112.10) or holds the last heading.Have been experimenting with more vor's but always the last frequency is chosen, in this case 114.20.Any ideas how to solve that problem, so there can be more stations in a row?Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 12, 200323 yr Of course last frequency is chosen. You can't distinguish with the toggling TF flag over which VOR you have flown. With your logic both frequencies are set to NAV1 at the same time, or better first 112.10, then almost immediately after theat 114.20, so 114.20 persists. You can different things, check also the ident to identify the sations, or place the frequencies in a row, use an index that increases and select per "case" in the value line.Something like <Value>... if{ (L:waypoint index,number) ++ (>L:waypoint index,number) 112.10 114.20 2 (L:waypoint index,number) case .... (>K:NAV1_RADIO_SET}...</Value>Arne Bartels
April 12, 200323 yr Arne, you mean something like this:(A:HSI TF flags, enum) 2 == if{ (L:NAV,number) ++ (>L:NAV,number) 112.10 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + 114.20 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + 113.20 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + 109.90 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + etc. etc.117.80 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + 5 (L:NAV,number) case (>K:NAV1_RADIO_SET) }Doesn't work so properly.What is the first chosen frequency, the last in this stock i presume?Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 12, 200323 yr Sorry I only know that "case" works, not exactly how, I need to investigate this to be sure.I personally would shift the float BCD conversion to the end so you need it only once, e.g:<Value>(A:HSI TF flags, enum) 2 == if{ (L:NAV,number) ++ (>L:NAV,number)112.10 114.20113.20109.90117.805 (L:NAV,number) case 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET) }</Value<It is shorter and less error prone, you can even copy the part to a <String> element to check the frequencies that would be selected selected. It is not implemented how the first frequency is set in the first place.Arne Bartels
April 12, 200323 yr Arne,Shall try your suggestion.The first frequency is set by loading a "flightplan" in my rudimentary fmc; that works ok.The 's are a really nightmare, abracadabra and headache for me, are you willing?????Janhttp://community.webshots.com/sym/image4/2...75aouncN_ph.jpg Jan "Beatus ille qui procul negotiis..."
April 15, 200323 yr Hallo,With the no problems, but the frequency's are a mess.Sometimes the next one is chosen, mostly the last.I cannot find the proper solution and am stuck with the FMC.This is what i have:%( 115.60 117.30 112.10 116.80 112.80 109.00 114.10 7 (L:NAV,number) case)%!6.2f! (A:HSI TF flags, enum) 2 == if{ (L:NAV,number) ++ (>L:NAV,number) 115.60 117.30 112.10 116.80 112.80 109.00 114.10 7 (L:NAV,,number) case 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET) 1(>K:TOGGLE_AFTERBURNER2) }Any ideas??Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
April 16, 200323 yr I tried a bit and it worked (mostly). One problem is that it is possible that frequencies are stepped over, since they might be FROM before the correct course is selected. As one solution (their might be others) I thought that waypoint switching should only be possible, if you aren't far from the VOR, instead of the real distance NAV1 SIGNAL is chosen. <Element><Select><Value> (A:HSI TF flags, enum) 2 == (A:NAV1 SIGNAL,number) 40000 > && if{ (G:Var2) ++ (>G:Var2) 115.20 116.50 117.45 112.90 115.10 110.60 117.30 7 (G:Var2) case 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:NAV1_RADIO_SET) }</Value></Select></Element> Don't forget the frequencies are run through from end to begin.BTW instead of using strings, you can also use the <Tooltip> for "debugging info", e.g. <Tooltip>%((G:Var2))%!d! %((A:NAV1 SIGNAL,number))%!.1f!%</Tooltip> See also the pic for a successful flown flightplan.Arne Bartels
April 16, 200323 yr Arne,To my surprise the previous mentioned stuff works suddenly(?} reasonable.It seems that a good startup-situation, plane- and fmc setup is a must.Your code looks again better, so back to the drawing board.I use the string in a sort of "PROG-page" of the fmc.Next step ADF and ISECS if at all possible?????????????Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
April 18, 200323 yr Found out that range of the VOR and flightlevel are important factors too (of course).Don't understand what(A:NAV1 SIGNAL,number) 40000 >really does.The whole thing remains pretty unstable still.What about setting and flying to an AIRPORT (or coordinate)? Making a rudimentary xml-gps.Jan"Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
April 18, 200323 yr As I said, the signal strength is an indirect measure for the distance. To get the bearing to an airport (or any other waypoint), you have to calculate the distance from the coordinates.Arne Bartels
Create an account or sign in to comment