April 1, 201214 yr <Gauge Name="WPT_Distance" Version="1.0"> <Element> <Position X="28" Y="0" /> <Text Bright="Yes" X="30" Y="14" Length="5" Fixed="Yes" Font="Quartz" Color="#FF9933" Adjust="right" VerticalAdjust="Bottom"> <String>%((A:GPS WP Distance,nMiles) s0 int)%!03d!.%(l0 1 % 10 * int)%!d!</String> </Text> </Element> <Mouse> <Area Left="118" Top="5" Width="40" Height="9"> <Tooltip>GPS_WP_DISTANCE,NMiles</Tooltip> </Area> </Mouse></Gauge>Hello,my gauge WPT_Distance follows the flight plan properly if the flight is started from departure airport.Resuming a saved flight situation the gauge starts to calculate the distance from the departure airport and not to the next waypoint as it was when the flight situation has been saved.I will appreciate an help to solve this issue.Thanks Gianfranco
April 1, 201214 yr Hi,May be you can save the value in "Logger".See: http://forum.avsim.n...__fromsearch__1 Jan "Beatus ille qui procul negotiis..."
April 14, 201214 yr Hi, I tested my readout : %((A:GPS WP DISTANCE,nmiles))%!3.1f! nm % versus yours, and I have seen no difference. I checked the distantance at takeoff to the next WP. Both readouts the same. I flew acorrding to my flight plan two WPs and saved my flight. I re-started FSX with this saved flight and both readouts displaed the same distance to the next target WP correct also. Did I tested the situation correct ? Dietmar
April 14, 201214 yr Did you test ihe gps loop %((@c:FlightPlanWaypointDistance,nmiles))%!d! ? Jan "Beatus ille qui procul negotiis..."
April 15, 201214 yr Jan, did you asked me ?? If so, no, I did not tested the @C:.... readout. The question from Gianfranco was however, related to the (A: GPS..... LVAR. I think for using the @c: LVAR you need to do some calculations for certain results. Dietmar
April 15, 201214 yr The gps @c value gives a good result afaik. Jan "Beatus ille qui procul negotiis..."
April 15, 201214 yr Author Tanks Dietmar looking and testing your string I was able to correct my string and now it works perfectly. My string now is: <String>%((A:GPS WP Distance,nMiles) s0 int)%!003d!.%(l0 1 % 10 * int)%!d!</String> Thanks Gianfranco
April 20, 201214 yr Hi Jan, may be you can help me on this. What do I have to do to get this info out of this readout: %((@c:WaypointAirportRunwayLength,feet))%!d! The @c: macro is set correct to C:fs9gps I get all the info out of a @C: .......... readout as long as I use a @c:FlightPlan .......... readout. it seems I need to set something into @C: ............in order to get my runway readout to work. But what ???? Thanks in advance Dietmar
April 21, 201214 yr Hi, There must be some flightplan active. Then In a formattedtext string: %((@c:FlightPlanWaypointsNumber) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointICAO) (>@c:WaypointAirportICAO) (L:Runway Selection,enum) (>@c:WaypointAirportCurrentRunway) %((@c:WaypointAirportRunwayLength,feet))%!d! gives the value. Use the L:Var for finding the correct runway. Hope it helps, Jan "Beatus ille qui procul negotiis..."
April 22, 201214 yr it seems I need to set something into @C: ............in order to get my runway readout to work. But what ???? Dietmar, Jan has already steered you in the right direction about Runway Length -- he is a pro when it comes to the gps module. Because many airports have more than one runway, the L:Var Jan talks about is necessary because it tells the gps module which runway to find the length of. However, the L:Var is not the runway name or the runway number, like RWY 32, it is an index value. The first runway in the airport runway list has index value=0, then next one has index=1. If you haven't already figured it out, or if you want to do more with the gps module, look here: http://www.robbiemce...m/blackbox/?gps Hope it helps, Bob
April 22, 201214 yr Hi Bob, Jan, I meanwhile got it to work. I found a part of Robbies PDF in the Internet ( thanks to Google), and I downloaded now the complete doc. This is a absolute excellent documentation !!! Great work !! During all my testing I discovered a (to me) real crazy thing. The string: %(11 (>@g:NearestAirportCurrentLine)) works only if the macro is : c:fs9gps . The letter “ c: “ does not work, if the letter is a capital letter !! So “ C: “ results in zero displays. Thats why I defined a extra macro g with c:fs9gps as the macro value. Somehow unbelievable. Dietmar
April 23, 201214 yr Hi Bob, Jan, I meanwhile got it to work. I found a part of Robbies PDF in the Internet ( thanks to Google), and I downloaded now the complete doc. This is a absolute excellent documentation !!! Great work !! During all my testing I discovered a (to me) real crazy thing. The string: %(11 (>@g:NearestAirportCurrentLine)) works only if the macro is : c:fs9gps . The letter “ c: “ does not work, if the letter is a capital letter !! So “ C: “ results in zero displays. Thats why I defined a extra macro g with c:fs9gps as the macro value. Somehow unbelievable. Dietmar No, no, no.... the gps variable NearestAirportCurrentLine has nothing to do with the @g functions of the stock gps_500 gauge. What you want is the following: <Macro Name="c">C:fs9gps</Macro> <Macro Name="C">C:fs9gps</Macro> Then, %(11 (>@c:NearestAirportCurrentLine)) or %(11 (>@C:NearestAirportCurrentLine)) will work. Or, you can do this without macros at all by using: %(11 (>C:fs9gps:NearestAirportCurrentLine)) FS Macos are simple, literal text substitutions. So, what Flight Simulator does is that when your gauge loads (eg, when your aircraft loads), it first subsitutes the macro definition wherever it finds an "@something". In this case, if you coded: %(11 (>@c:NearestAirportCurrentLine)) then with the code substitution, it immediately becomes: %(11 (>C:fs9gps:NearestAirportCurrentLine)) which is ultimately how Flight Sim wants it written. That's why you can avoid the macro and go straight to %(11 (>C:fs9gps:NearestAirportCurrentLine)) if you want. A couple of other points. First, (>c:fs9gps:NearestAirportCurrentLine) will not work - it has to be capital C. Note that the macro definitions both say C:fs9gps, but in case someone (like me) gets lazy and writes (>@c:NearestAirportCurrentLine) it will still work because after macro substitution, it becomes (>C:fs9gps:NearestAirportCurrentLine). Do you follow that? Also, any macro name is fine. <Macro Name="WhatIsThe">C:fs9gps</Macro> works as well. If you write: %(11 (>@WhatIsThe:NearestAirportCurrentLine)) it becomes: %(11 (>C:fs9gps:NearestAirportCurrentLine) Bob
April 23, 201214 yr Hi Bob, thanks for your explanation. I was somehow completely confused about two things. First the capital letter for the @C and secondly with this statement to control the loop : %(l1 (>@C:NearestAirportCurrentLine)) . As you see in my previous post, I had %(11 (>@C...... and not %(l1 .... . The letter "l" and the number "1" looked in my editor so much equal, that I just went grazy with my loop function. OK, all is now solved. I get all my nearest AP info and as well all my frequencies for an AP. As far as the macro is concerned you are completely correct. I worked with this kind of macros already in the past for my radar gauges, but here I steped into this crazy trap. Thank you once more for your help and quick reply. Best Dietmar
April 23, 201214 yr Moderator Dietmar, the lower-case L has bitten many, many people over the years, especially since when included in a box, the appearance between l and 1 in Courier typeface is nearly identical! :Hypnotized: Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
April 23, 201214 yr Thanks Bill, your comment making me no looking too stupide. However, the GPS related code is challenging a lot of us. Best Dietmar
Create an account or sign in to comment