Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML Increasing number switch

Featured Replies

Hi all I want to set up a switch for number increase ie: (current number) (current number increases by one gives bool 1 then (new current number) (new current number increases by one gives bool 1 etc. with no limit Tried a few things but can't get the reset to the next higher number Can anyone help

Paul EGLD

Hi PVE,Not sure, if you're talking about XML or C. In XML you can do it on this way:(L:Whatyouwant, number) 1 + (>L:Whatyouwant, number)Best RegardsMatthias

  • Author

Hi Matthias I am counting each flightplan Wpt passage number with (L:wpt_pass, number) gives 1-2-3-4 etc. I want to trigger 1 bool at each number increment to update the ATA fuel, distance, etc. I have it working OK with (A:GPS IS ACTIVE WAY POINT, bool) (A:GPS WP DISTANCE, nmiles) 3 < if { But the mileage number includes altitude and the trigger point does not match the GPS change point. Regards

Paul EGLD

Hi,I think there is a GPS variable that stores the number of waypoints left in the flight plan. Maybe (@c:FlightPlanWaypointsNumber) but I'm not sure. If you save its value at a/c startup, and then compares it with the last registered value, you should obtain something similar to a "Wpt passage number", but more accurate than the "distance less than 3 miles" solution. Just by saving the previous number and comparing with the new one like:(L:PrevFPIndex,number) (L:CurrentFPindex,number) != (>L:Flag, bool)should give what you're looking for.Tom

Hi,Why not use the GPS codes to show a flightplan with everything you want from it?Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Hi Tom (@c:FlightPlanWaypointsNumber) gives total of waypoints. Does not change on Wpt passage. I Tried (@c:FlightPlanWaypointsNumber)(L:WPt,number) "counts up from first waypoint" != (>L:Flag, bool) just gives 1 Paul

Paul EGLD

  • Author

Jan I am building a simple HA! FMC using only FS9 and FSgps info. The more I add to it the more difficult it becomes. I am now reaching the limit of my skills but with some help I think I can add few more things.

Paul EGLD

Hi,Made this one just for fun, it triggers a piece of music at waypointpassage.(A:GPS DRIVES NAV1,bool) if{ @FPLLineIndex (>L:waypointA,number) (@c:FlightPlanWaypointRemainingDistance,nmiles) 3 < if{ (P:Absolute time,seconds) 2 + (>L:fptimer,number) } (P:Absolute time,seconds) (L:fptimer,number) > if{ @FPLLineIndex (>L:waypointB,number) } (L:waypoint A,number) (L:waypointB,number) != if{ 1 (>L:BACH,number) (L:waypointB,number) 1 + (>L:waypointB,number) } } Of course you can do something else instead of making music.Hope it helps,Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Jan Your FMC Looks nice, I tried your code but not working I don't see the macro @FPLLineIndex anywhere is it yours.Paul

Paul EGLD

Paul,The macro is an existing one and will only work in the MS-GPS!Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Jan Found the macro, closed the space between the A, changed (@c:FlightPlanWaypointRemainingDistance,nmiles) for (A:GPS WP DISTANCE, nmiles) and now get a 1 spot on time but it does not reset to 0. Nearly there. Paul

Paul EGLD

  • Author

OK I got it Not sure if it's best way but it works. (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:BACH,enum) (L:waypointB,number) 1 + (>L:waypointB,number) } } (A:GPS WP DISTANCE, nmiles) 5 < (L:BACH,enum) 1 == && if{ (P:Absolute time,seconds) 4 + (>L:fptimer,number) } (P:Absolute time,seconds) (L:fptimer,number) > if{ (L:BACH,enum) 0 (>L:BACH,enum) }

Paul EGLD

May be this works too:(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:BACH,enum) (L:waypointB,number) 1 + (>L:waypointB,number) } els{ 0 (>L:BACH,enum) } } Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author

Jan Even better! Thanks for your help. Paul

Paul EGLD

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.