Hi.
I am writing a text gauge in which after clicking on a selected waypoint number,will be displayed the course to this waypoint.
For now,I have a script base in which,after entering a waypoint number(in the script file),displays its ID.
Ultimately,it would display a course to selected waypoint, but so far no code wants to work.
Unfortunately,I do not know how to do it using the -WPT1, WPT2, WPT3 buttons.
I tried various ways with XML and nothing works.
So I have two questions:
1.What code should I use to display a course to the selected waypoint instead of the "waypoint ID".
I tried to paste the code from line 29-"((A: GPS WP BEARING, Degrees) (A: Plane heading degrees gyro, degrees) - dnor)"
instead of -"(@ c: FlightPlanWaypointIdent)" from line 28, but it only indicates the course to waypoint 1.
2.What code to use so that the buttons,created by me,change the waypoint number to display.
Thx,
Rob.
I am writing a text gauge in which after clicking on a selected waypoint number,will be displayed the course to this waypoint.
For now,I have a script base in which,after entering a waypoint number(in the script file),displays its ID.
Ultimately,it would display a course to selected waypoint, but so far no code wants to work.
Unfortunately,I do not know how to do it using the -WPT1, WPT2, WPT3 buttons.
I tried various ways with XML and nothing works.
So I have two questions:
1.What code should I use to display a course to the selected waypoint instead of the "waypoint ID".
I tried to paste the code from line 29-"((A: GPS WP BEARING, Degrees) (A: Plane heading degrees gyro, degrees) - dnor)"
instead of -"(@ c: FlightPlanWaypointIdent)" from line 28, but it only indicates the course to waypoint 1.
2.What code to use so that the buttons,created by me,change the waypoint number to display.
Thx,
Rob.
XML:
<Gauge Name="Test" Version="1.0">
<Macro Name="c">C:fs9gps</Macro>
<Element>
<Rectangle Width="200" Height="200" FillColor="white" Bright="No"/>
<Element>
<Position X="1" Y="1"/>
<Select>
<Value>
sp0 1 (@c:FlightPlanWaypointsNumber) s0 l0 sp0 <!-- PT1. By changing the first sp0 value to 3,2 or 1,I change the waypoint to 3,2 or 1,displayed in PT2. -->
</Value>
</Select>
</Element>
<Element>
<Position X="1" Y="1"/>
<FormattedText X="200" Y="200" Font="Glassga" FontSize="20" LineSpacing="30" Color="blue" BackgroundColor="transparent" Bright="Yes">
<String>
%WPT 1%
\n%WPT 2%
\n%WPT 3%
\n%CRS TO SLCTD WPT: %( sp0 1 (@c:FlightPlanWaypointsNumber)
if{ l0 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointIdent) } )%!s!% <!-- PT2. Waypoint data displayed on the basis of variables introduced in PT1. -->
\n%CRS TO NXT WPT: %((A:GPS WP BEARING,Degrees) (A:Plane heading degrees gyro,degrees) - dnor )%!d!% <!-- PT3. Always displays the course to the next waypoint. -->
</String>
</FormattedText>
</Element>
</Element>
<!-- Waypoint select buttons -->
<Mouse>
<Area Left="1" Width="200" Top="1" Height="30">
<Cursor Type="Hand"/>
<Click>
</Click>
<Tooltip>WP1</Tooltip>
</Area>
<Area Left="1" Width="200" Top="40" Height="30">
<Cursor Type="Hand"/>
<Click>
</Click>
<Tooltip>WP2</Tooltip>
</Area>
<Area Left="1" Width="200" Top="70" Height="30">
<Cursor Type="Hand"/>
<Click>
</Click>
<Tooltip>WP3</Tooltip>
</Area>
</Mouse>
</Gauge>


