March 18, 200620 yr Hi all I want to remove Vor types 3 4 5 and 6 from search using (>@c:NearestVorRemoveVorType) 3 (>@c:NearestVorRemoveVorType) works OK But 3 >= (>@c:NearestVorRemoveVorType) no good. Paul EGLD
March 19, 200620 yr Hi,3 >= (>@c:NearestVorRemoveVorType) Is this a literal assignment?If so, then the result of whatever you are comparing against 3 value is either 0 or 1, and that is what you are actually assigning to the macro.Tom EDIT: maybe this works:3 sp0 :0 l0 d (>@c:NearestVorRemoveVorType) ++ s0 6 <= if{ g0 }
March 19, 200620 yr Author Tom (A:GPS WP NEXT LAT, Radians) (>@c:NearestVorCurrentLatitude, Radians) (A:GPS WP NEXT LON, Radians) (>@c:NearestVorCurrentLongitude, Radians) 1 (>@c:NearestVorMaximumItems) 40 (>@c:NearestVorMaximumDistance, NMiles) 3 (>@c:NearestVorRemoveVorType) Works OK and removes type 3 vor 3 >= (>@c:NearestVorRemoveVorType) gauge works but ignores this line 3 sp0 :0 l0 d (>@c:NearestVorRemoveVorType) ++ s0 6 <= if{ g0 } gauge won't work Other commands availible NearestVorCurrentFilter, NearestVorSetDefaultFilter. do you know what these do? Paul EGLD
March 19, 200620 yr Paul,""3 sp0 :0 l0 d (>@c:NearestVorRemoveVorType) ++ s0 6 <= if{ g0 } gauge won't work"" Did you try first 4 (>@c:NearestVorRemoveVorType)5 (>@c:NearestVorRemoveVorType)6 (>@c:NearestVorRemoveVorType)to see whether 4 to 6 types are indeed removed? ""Other commands availibleNearestVorCurrentFilter, NearestVorSetDefaultFilter. do you know what these do?""I don't, sorry. Never tried these ones.Tom
March 19, 200620 yr Author Tom Yes your code does work, My fault forgot to change the < Thank you. Full code for VOR autotune for your FMC. C:fs9gpsC:fs9gps(A:GPS WP NEXT LAT, Radians) (>@c:NearestVorCurrentLatitude, Radians) (A:GPS WP NEXT LON, Radians) (>@c:NearestVorCurrentLongitude, Radians) 1 (>@c:NearestVorMaximumItems) 50 (>@c:NearestVorMaximumDistance, NMiles)3 sp0 :0 l0 d (>@c:NearestVorRemoveVorType) ++ s0 6 < = if{ g0 }(L:AutoTune, bool) 1 == if{ (@c:NearestVorCurrentFrequency, Frequency BCD16) (>K:NAV2_RADIO_SET) } Paul EGLD
March 20, 200620 yr Paul,That is a piece of code I will probably use in my own VOR autotuning system :-)Thank you!Tom
March 20, 200620 yr Hi,Also a lot of k-events are fired when autotune is on.(Doug's event checker)Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 20, 200620 yr Author Jan Have not noticed any bad effects on the panel. It should fire as it passes the active waypoint, it only updates frequency once on my system. I will check it again. Paul EGLD
March 20, 200620 yr Author Jan Put this in gauge (A:GPS DRIVES NAV1,bool) if{ @FPLLineIndex (>L:waypointA,number) (A:GPS WP DISTANCE, nmiles) 3 < if{ (P:Absolute time,seconds) 2 + (>L:fptimer,number) } (P:Absolute time,seconds) (L:fptimer,number) > if{ @FPLLineIndex (>L:waypointB,number) } (L:waypointA,number) (L:waypointB,number) != if{ 1 (>L:ChangeOver,enum) (L:waypointB,number) 1 + (>L:waypointB,number) } els{ 0 (>L:ChangeOver,enum) } } and change (L:AutoTune, bool) 1 == if{ (@c:NearestVorCurrentFrequency, Frequency BCD16) (>K:NAV2_RADIO_SET) } to (L:AutoTune, bool) 1 == (L:ChangeOver,enum) 1 == && if{ (@c:NearestVorCurrentFrequency, Frequency BCD16) (>K:NAV2_RADIO_SET) } Works OK and fires on waypoint passage Paul EGLD
Create an account or sign in to comment