Sign in to follow this  
Guest Fabrizio Berretta

GPS cumulative distance

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

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

Share this post


Link to post
Share on other sites

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) }

Share this post


Link to post
Share on other sites

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) ???

Share this post


Link to post
Share on other sites

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) } } }

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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}

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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) }

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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) }

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this