OK
This is stone-age old, quite simple code and can probably much better with new macros and modules.
In the code each waypoint is an element containing another one.
Using FormattedText makes it possible to use a value/function in it,
also the use of an image instead of a polygon, see msgps.
The code uses some macros and in the click (EFIS) you need to do something for the zoom of the map and the waypoints.
First the macros:
Code:
<Macro Name="position">
(A:PLANE LATITUDE,RADIANS) (>@c:GeoCalcLatitude1,RADIANS)
(A:PLANE LONGITUDE,RADIANS) (>@c:GeoCalcLongitude1,RADIANS)
(@c:FlightPlanIsActiveApproach)
if{
(@c:FlightPlanWaypointApproachLatitude,RADIANS) (>@c:GeoCalcLatitude2,RADIANS)
(@c:FlightPlanWaypointApproachLongitude,RADIANS) (>@c:GeoCalcLongitude2,RADIANS)
}
els{
(@c:FlightPlanWaypointLatitude,RADIANS) (>@c:GeoCalcLatitude2,RADIANS)
(@c:FlightPlanWaypointLongitude,RADIANS) (>@c:GeoCalcLongitude2,RADIANS)
}
</Macro>
<Macro Name="shift1">
(@c:GeoCalcBearing,radians) (A:PLANE HEADING DEGREES TRUE,radians) -
cos (@c:GeoCalcDistance,nmiles) (L:Zoomfactor,number) * * -1 *
</Macro>
<Macro Name="shift2">
(@c:GeoCalcBearing,radians) (A:PLANE HEADING DEGREES TRUE,radians) -
sin (@c:GeoCalcDistance,nmiles) (L:Zoomfactor,number) * *
</Macro>
<Macro Name="eta">
%((@c:FlightPlanWaypointETA,hours) flr 100 % )%!02d!%((@c:FlightPlanWaypointETA,minutes) flr 60 %)%!02d!z
</Macro>
As you can see you have to do something with the "zoomfactor".
@position gives distance and bearing from plane to waypoint, the result visible in @shift1 and 2, a little bit Pythagoras.
@eta is just ETA at waypoint in zulu time.
Now the element:
Mind that the numbers of shift and clip depends on the dimensions of ND, Map, scale and what you want to be visible.
Code:
<Element>
<FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%((@c:FlightPlanActiveApproachWaypoint) (>@c:FlightPlanWaypointApproachIndex) @position)
%((@c:FlightPlanWaypointApproachType))%{case}%{:1}%((@c:FlightPlanWaypointApproachName))%!s!%{:2}PROC.TURN L%{:3}PROC.TURN R%{:4}DME ARC L%{:5}DME ARC R%{:6}HOLD L%{:7}HOLD R%{:8}%((@c:FlightPlanWaypointApproachTarget,nmiles))%!0.1f! NM%{:9}%((@c:FlightPlanWaypointApproachTarget,feet))%!d! FT%{:10}MAN SEQ%{:11}%((@c:FlightPlanWaypointApproachName))%!s!%{end}
%{else}%((@c:FlightPlanActiveWaypoint) (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!\n\{lsp=11}@eta
%{end}
</String>
<Axis X="-4" Y="-2"/>
</FormattedText>
<Element>
<Polygon Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" Bright="Yes"><Point X= "2" Y="-2"/><Point X= "0" Y="-9"/><Point X="-2" Y="-2"/><Point X="-9" Y= "0"/><Point X="-2" Y= "2"/><Point X= "0" Y= "9"/><Point X= "2" Y= "2"/><Point X= "9" Y= "0"/><Point X= "2" Y="-2"/></Polygon>
<Clip Top="50" Left="60" Right="580" Bottom="400"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y= "50"/>
<Item Value= "0" Y="370"/>
<Item Value= "20" Y="690"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X= "0"/>
<Item Value= "0" X="320"/>
<Item Value= "20" X="640"/>
</Nonlinearity>
</Shift>
<Clip Top="50" Left="60" Right="580" Bottom="400"/>
</Element>
This is the Active Waypoint!
Now it becomes simply:
Previous - or next wpt is same code except:
(c:FlightPlanActiveApproachWaypoint) 1 - (>@c:FlightPlanWaypointApproachIndex)
(c:FlightPlanActiveApproachWaypoint) 2 - (>@c:FlightPlanWaypointApproachIndex)
or
(@c:FlightPlanActiveWaypoint) 1 - (>@c:FlightPlanWaypointIndex)
(@c:FlightPlanActiveWaypoint) 2 - (>@c:FlightPlanWaypointIndex)
etc.
and
(c:FlightPlanActiveApproachWaypoint) 1 + (>@c:FlightPlanWaypointApproachIndex)
(c:FlightPlanActiveApproachWaypoint) 2 + (>@c:FlightPlanWaypointApproachIndex)
or
(@c:FlightPlanActiveWaypoint) 1 + (>@c:FlightPlanWaypointIndex)
(@c:FlightPlanActiveWaypoint) 2 + (>@c:FlightPlanWaypointIndex)
etc.
Succes!