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.

GPS cumulative distance

Featured Replies

In gps flight plan page, there is a "CUM" variable reporting total distance fron each waypoint.I need to find out this variable (xml) for the last waypoint (destination airport). I try with (C:fs9gps:FlightPlanWaypointRemainingTotalDistance,nmiles) but this is always "0" because it readthe active waypoint. How do i can read this variable for the last waypoint (destination airport) ?I need this to made a custom xml VNAV autopilot.

Hi,Not sure which one, but experiment with: FlightPlanWaypointRemainingDistance FlightPlanWaypointDistanceRemaining FlightPlanWaypointDistanceTotal FlightPlanWaypointDistance Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hello I use this macro for total distance remaining in NM (A:GPS IS ACTIVE WAY POINT, bool) if{ (A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles) }

Paul EGLD

Thank you very much, but i don't know how macros works,how i can put the result into a my L variable, such as(>L:MY REMAINING DIST, number) ???

Hello If you want to print it put the macro in your gauge:- (A:GPS IS ACTIVE WAY POINT, bool) if{ (A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles) } then set up your string text size & position in %((A:GPS IS ACTIVE WAY POINT, bool))%{if}%(@TotalDistRem)%!5d!%NM%{end}% Or use it in a Value without brackets Example:- 19.9 20 @TotalDistRem rng (A:Autopilot approach hold, bool) & (A:GPS DRIVES NAV1,bool) & if{ (>K:TOGGLE_GPS_DRIVES_NAV1) if{ (A:HSI CDI needle, number) abs 125 > if{ (A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET) 1 (>K:AP_PANEL_HEADING_HOLD) } } }

Paul EGLD

Hello,many many thanks, now it works very well and i can use this variable for my VNAV autopilot.

  • 6 months later...

Try as I may I can't get the total miles to destination to show up. All I want to do is display the miles but no matter what combination I've tried It just doesn't work. Spent about a week, couple hours a night, trying to make it work. I know nothing about XML programming and I can't find the information to point me in the right direction.Can someone show me how to display this. I tried putting the ......>/String> statement where in the gauge file where it should show but not only does it not show but the unrelated line below disappears. I've got it to display 0.0 NM but can't get anything else. I'm missing something about the variable I think.

Hello, Try Put the two macros in your gauge C:fs9gpsC:fs9gps Then ((A:GPS IS ACTIVE WAY POINT, bool))%{if}%((A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles))%!6.1f!%{end}

Paul EGLD

Thank you for the reply but, I'm sorry, I'm just not getting it. I need to clarify something though. I am attempting to ad total distance remaining to an existing gauge. It's the Lear-45 Enhancements by Alexander Barthel that's available here at Avsim. I want to put it at the top right on the map page where it now shows 15NM. It remains 15 at all times. Groundspeed TAS and Temp are correct. This is with the original macro suggested by pve. 170.000,27.000TrueTrueArial#AAAAAA10%(@TotalDistRem)%!5d!n -------this is where is should be%((A:AIRSPEED TRUE, knots))%!3d!n%((A:GPS GROUND SPEED, knots))%!3d!n%((A:AMBIENT TEMPERATURE,celsius))%!3d!http://forums.avsim.net/user_files/175940.jpgI did try pve's last suggestions with no success. If I put the string line in it doesn't show and the other values dissappear.

Hi,May be it has to do with the macro notation.I am not familiar with the new one in fsx, but Tom wrote somewhere that it should be something like:(A:GPS IS ACTIVE WAY POINT, bool) if{ (A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles) }

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Thanks for the response but I just don't get it. I guess I'll just give it up for a while.

  • 1 month later...

pve, thank you for your knowledge on this. but i am also trying to apply this macro for a similar result for some limited VNAV. basically im trying to have my gauge perform a command when the "TotalDistRem" is less than a defined number. ive included part of my gauge and would be honored if you or anyone would look at it and tell me what i did wrong. a big thanx in advance!!!!ps.my gauge works perfectly with the (A:GPS WP DISTANCE, nmiles) variable. but this limits me to a "direct to" flight plan and im trying for multiple waypoints while the destination distance is monitored by the gauge...........3rett (A:GPS IS ACTIVE WAY POINT, bool) if{ (A:GPS FLIGHT PLAN WP Count,number) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointRemainingTotalDistance,nmiles) } @TotalDistRem 55 < if{ 5000 (>K:AP_ALT_VAR_SET_ENGLISH) -2400 (>K:AP_VS_VAR_SET_ENGLISH) }

Hello 3rett Is this for FSX or FS9 & did you put the two macro lines at the top of your gauge:- C:fs9gpsC:fs9gps

Paul EGLD

ok ok i was up all night and finally got it. it was the.....C:fs9gpsC:fs9gpsfrom one of pve's entries that did it. not sure which one at this point but dont really care either :) i just wana say thanx to everyone. lots of super intelligent, kind, and patient people on this forum..................3rett

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.