• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 Once again about custom map

Messages
122
Country
russia
Hello everybody! Guys, I need your help. I was made a Navigation Display for my project. Almost done, but I really don't understand how make (add, change) a custom airport, VOR, NDB, waypoints sumbols to the customdraw map. Whatever by bmp or by polilines. Prefer is bmp, because VOR symbol is specified. But waypoints may by polilines, because it simple circle. Or I don't need a customdraw? Must be use GPS variables? But how "to say" it by xml?
Here is a example of ND.
 

Attachments

  • IMG_20181017_093918.jpg
    IMG_20181017_093918.jpg
    51.3 KB · Views: 295
Messages
205
Country
netherlandsantilles
Hi MrJam,
I struggled with these types of issues myself recently. I suggest you to download the customdraw map book if you did not already, and read it trough. You can find it here : https://robbiemcelrath.com/fs/guides/gps
It has been prepared by Bob (rpmc) and is a must have if you want to get a grip on this topic. To be more specific to your question I believe, if I understand it correctly, you want to change the default icons representing the navigation symbols into custom ones of your own, right? If that is the case i think i read this to be possible on the forums. you will have to hack the default FSX/P3D GPS gauge, find the corresponding bmp's vor the several navaids (VOR, NDB, wpt etc) within it, and replace them with your custom bitmaps for the navaids. You will have to do some trial and error here I have not done it yet myself but it is on my list. just be careful and make a backup of your current gps gauge just in case you mess up.
let us know how it goes. Bthwy if that your custom gauge or is it a real picture? it already looks fantastic...
Adino
 
Messages
122
Country
russia
Hi adino!
Tnx for reply.

Hi MrJam,
I struggled with these types of issues myself recently. I suggest you to download the customdraw map book if you did not already, and read it trough. You can find it here : https://robbiemcelrath.com/fs/guides/gps

Oh yes, I forgot to say that I read both of these books. As well as topics on this forum and on avsim.kom associated with customdraw. But still did not understand how to do it. Otherwise I would not create a topic.

Hi MrJam,
To be more specific to your question I believe, if I understand it correctly, you want to change the default icons representing the navigation symbols into custom ones of your own, right?
Adino

Yes, you are right, almost. I just want it to look closer to reality, no matter how to do it, well, except C ++. I suppose it can be implemented using xml. And I tried to do it on the example of several codes that I found on the forums, but mostly they were written under FS9 and, accordingly, most of them do not work in prepar. In general, I did not succeed.

Hi MrJam,
Bthwy if that your custom gauge or is it a real picture? it already looks fantastic...
Adino

This is a photo, and below is an example (screenshots) of what is at the moment (gauge). As you can see, the font and the symphol of waypoints do not coincide and are not visible at all. The font is too small. The colors are not the same.

2018-10-17_20-33-55-691.jpg2018-10-17_20-33-35-681.jpg
 
Messages
205
Country
netherlandsantilles
I see indeed but your heading the right way...
Well you can try change the bitmaps like I told you previously and see wether you will get some positive results otherwise I leave it to the XML gurus around here for hints.
Best of luck.
Adino
 
Messages
1,564
Country
thailand
It's possible to achieve what you want using XML. If I were to do it, I would use customdraw:map to draw the compass rose and degree markings and the flight plan path. Then, turn off the airport, intersection and navaid layers. In their place, use your custom bmps drawn on top of the map.

To position the bmps, use GPS variables to determine their lat/lon. Use XML shift x an shift y to move them as the flight progresses. You will need to scale lat/lon to the XML gauge units of your map.

My description glossed over quite a lot of the fine print - this is a bit on the complicated side, but it's certainly possible to do it.

Unfortunately, there is no way to automatically substitute custom bmps or polyline symbols in customdraw and have customdraw handle the scaling for you.

Also, you really cant totally avoid using customdraw because that's the only way I know to draw the flight path line.

If you're not already skilled in XML when you tackle this, you will be pretty good at it by the time you finish the project.

Bob
 
Messages
205
Country
netherlandsantilles
Hi rpmc,
Indeed your approach seem to be the best option here especially if you want the navaids to remain crisp in all zoom levels.

However to avoid all that tedious programming in XML, I was thinking previously in circumventing this by vector scaling the custom navaids bmps in the exact dimension used by the sim default GPS gauge navaids bmps and then replacing them with my own. Yet I believe the waypoints are not bmps and are being drawn by polylines (I have not analyse the GPS code in its entirely as yet) However if this is the case these polylines codes will have to be replaced by the new custom bmps instead within the XML code using visibility and stuff, so code writing/hacking will be inevitable after all...
 

Luka

Resource contributor
Messages
212
Country
serbia
Hi rpmc,
Indeed your approach seem to be the best option here especially if you want the navaids to remain crisp in all zoom levels.

However to avoid all that tedious programming in XML, I was thinking previously in circumventing this by vector scaling the custom navaids bmps in the exact dimension used by the sim default GPS gauge navaids bmps and then replacing them with my own. Yet I believe the waypoints are not bmps and are being drawn by polylines (I have not analyse the GPS code in its entirely as yet) However if this is the case these polylines codes will have to be replaced by the new custom bmps instead within the XML code using visibility and stuff, so code writing/hacking will be inevitable after all...

In fs9gps bitmaps are used only within the "formatted text" for the nearest lists and similar things. Waypoints on the map are GDI objects hardcoded in gps.dll, and here we have very limited possibilities to change their size and color.
 
Messages
205
Country
netherlandsantilles
Thanks for clarifying that Luka, in that case Bob's suggestion is the only feasible solution IMO.
 
Messages
122
Country
russia
Friends, thank you all for the answers. Sorry, there was no time to unsubscribe, busy with work.

To position the bmps, use GPS variables to determine their lat/lon. Use XML shift x an shift y to move them as the flight progresses. You will need to scale lat/lon to the XML gauge units of your map.

Theoretically, I understand what needs to be done that way, but I don’t understand how to do it practically.
I have a sample when that I found on the Internet. But the syntax is clearly not correct, since it was written for FS2004, and it does not work in FSX or prepar.
 

Attachments

  • code.txt
    7.9 KB · Views: 303
Messages
1,564
Country
thailand
That syntax is FS9 XML schema and is just fine for FS9, FSX, and Prepar3D thru latest version. If it doesn't work for you, you have made a mistake somewhere.
 
Messages
122
Country
russia
That syntax is FS9 XML schema and is just fine for FS9, FSX, and Prepar3D thru latest version. If it doesn't work for you, you have made a mistake somewhere.

Bob, did I need to use macros? If yes, I need to add it at the top of element?
 
Messages
1,564
Country
thailand
The first thing to say is that I wouldn't know if the XML you posted works or not. It's just a portion of a gauge and critical things like where/how those L:Vars are defined isn't shown. You'll need to study the entire gauge in detail to see if there are any syntax or logic errors.

The snippet includes several macros and they appear to defined. Macro definitions are best placed near the top of the gauge, but in any event, before the macro call.

Bob
 
Messages
542
Country
australia
1. What code syntax are you using in your instrument shown above at reply # 3 , FS9 or FSX ?

2. The sample code that you attached at reply # 9 , is that the complete code that you found on the internet , or is it only a part of what you found there ?

3. Looking at the code that you attached , there is sufficient code to recreate that instrument as a functioning unit .
I would recommend that you get that sample working so that you can see exactly the Waypoint data that is appearing on the
Flight Plan lines .
Test it with a long Flt Pln at least 20 legs long .
As you know there are 3 conditions applicable to Wpts , Past flown , Current active being flown , and Future yet to be flown .
What you are looking for is what info or graphics appears at each Wpt node ,
and do all Wpt nodes have that data .
Looking at that attachment code it seems that only 3 Wpt nodes get data ,
ie;
Wpt -1 = Past flown Wpt ,
Code:
((@c:FlightPlanActiveApproachWaypoint) s0 1 - (>@c:FlightPlanWaypointApproachIndex) @position)
Active Wpt = Current Wpt being flown ,
Code:
(l0 (>@c:FlightPlanWaypointApproachIndex) @position)
and
Wpt 1 = Future Wpt yet to be flown .
Code:
(l0 1 + (>@c:FlightPlanWaypointApproachIndex) @position)

If you require more Wpts to be labelled then you need to repeat the Wpt code section for those that you wish to be labelled
when larger zooms are selected .
It can become a burden repeating those ' Wpt code sections ' , for example if you allow for a flight plan of
up to 99 legs then the following number of ' Wpt code sections ' would be required ,
98 Past Wpts
1 Active Wpt
98 Future Wpts
Total code sections is 197 .

In my Radar I have about , 6 Past , 1 Active , and 7 Future , however at large zooms not all Wpts are labelled .

Cheers
Karol
 
Messages
122
Country
russia
The first thing to say is that I wouldn't know if the XML you posted works or not.

Bob, no, this code is not working, unfortunately.

1. What code syntax are you using in your instrument shown above at reply # 3 , FS9 or FSX ?

Karol, I'm trying to do for prepar3d v4.

2. The sample code that you attached at reply # 9 , is that the complete code that you found on the internet , or is it only a part of what you found there ?

No, this is part of the code. I was just trying to insert this part into my code.
3. Looking at the code that you attached , there is sufficient code to recreate that instrument as a functioning unit .
I would recommend that you get that sample working so that you can see exactly the Waypoint data that is appearing on the
Flight Plan lines .

That's exactly what I'm trying to do.

Regards, Alexey.
 
Messages
542
Country
australia
Reply Part 1 .

Hi Alexey

I'm assuming that your instrument is written in FS9 Syntax code .
The following is the applicable Macro area as shown in above Code Text attachment .
The Zoom will need to be changed to match the zoom that you are using in your instrument .

Cheers
Karol
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="CalculateZoomFactor">2000 1500 1000 500 400 350 300 250 200 190 180 170 160 150 140 130 120 115 109.83051 54.915257 27.457628 13.728814 6.8644071 0 24 @1 case</Macro>
 
Last edited:
Messages
542
Country
australia
Reply Part 2 .

Hi Alexey

* Below is the code that labels the Waypoints on the flight plan line .
* I have reformatted it to make it easier to read and understand .
* I have also added an extra past Wpt section and a Future Wpt section so that you can see how each Wpt is called ,
notice that the Wpt is called twice in each Wpt section .
* The " Clip " size is the size of the display area of your instrument , the clip ensures that the labelling only shows on the display .

All of the Wpt sections should be within an Element shell with a Visibility to enable you to switch it On or Off .

Cheers
Karol
Code:
<!-- WP -2 -->
   <Element>
     <FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" LineSpacing="16"  Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
       <String>\{bo}
               %((@c:FlightPlanIsActiveApproach))
          %{if}%((@c:FlightPlanActiveApproachWaypoint) s0 2 - (>@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) s0 2 - (>@c:FlightPlanWaypointIndex) @position)
               %((@c:FlightPlanWaypointIdent))%!s!
               %{end}
       </String>
         <Axis X="-10" Y="-4"/>
     </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 Left="0" Right="654" Top ="50" Bottom="458" />
         </Element>
           <Shift>
             <Value>@shift1</Value>
               <Nonlinearity>
                  <Item Value="-20" Y=  "33"/>
                  <Item Value=   "0" Y="360"/>
                  <Item Value= "20" Y="687"/>
               </Nonlinearity>
           </Shift>
           <Shift>
             <Value>@shift2</Value>
               <Nonlinearity>
                  <Item Value="-20" X=   "0"/>
                  <Item Value=   "0" X="327"/>
                  <Item Value= "20" X="654"/>
               </Nonlinearity>
           </Shift>
               <Clip Left="0" Right="654" Top ="50" Bottom="458" />
   </Element>
  
<!-- WP -1 -->
   <Element>
     <FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" LineSpacing="16"  Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
       <String>\{bo}
               %((@c:FlightPlanIsActiveApproach))
          %{if}%((@c:FlightPlanActiveApproachWaypoint) s0 1 - (>@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) s0 1 - (>@c:FlightPlanWaypointIndex) @position)
               %((@c:FlightPlanWaypointIdent))%!s!
               %{end}
       </String>
         <Axis X="-10" Y="-4"/>
     </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 Left="0" Right="654" Top ="50" Bottom="458" />
         </Element>
           <Shift>
             <Value>@shift1</Value>
               <Nonlinearity>
                  <Item Value="-20" Y=  "33"/>
                  <Item Value=   "0" Y="360"/>
                  <Item Value= "20" Y="687"/>
               </Nonlinearity>
           </Shift>
           <Shift>
             <Value>@shift2</Value>
               <Nonlinearity>
                  <Item Value="-20" X=   "0"/>
                  <Item Value=   "0" X="327"/>
                  <Item Value= "20" X="654"/>
               </Nonlinearity>
           </Shift>
               <Clip Left="0" Right="654" Top ="50" Bottom="458" />
   </Element>
  
<!-- WP Active -->
   <Element>
     <FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" LineSpacing="16"  Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
       <String>\{bo}
               %((@c:FlightPlanIsActiveApproach))
          %{if}%(l0 (>@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}%(l0 (>@c:FlightPlanWaypointIndex) @position)
               %((@c:FlightPlanWaypointIdent))%!s!
               %{end}
       </String>
         <Axis X="-10" Y="-4"/>
     </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 Left="0" Right="654" Top ="50" Bottom="458" />
         </Element>
           <Shift>
             <Value>@shift1</Value>
               <Nonlinearity>
                  <Item Value="-20" Y=  "33"/>
                  <Item Value=   "0" Y="360"/>
                  <Item Value= "20" Y="687"/>
               </Nonlinearity>
           </Shift>
           <Shift>
             <Value>@shift2</Value>
               <Nonlinearity>
                  <Item Value="-20" X=   "0"/>
                  <Item Value=   "0" X="327"/>
                  <Item Value= "20" X="654"/>
               </Nonlinearity>
           </Shift>
               <Clip Left="0" Right="654" Top ="50" Bottom="458" />
   </Element>
  
<!-- WP 1 -->
   <Element>
     <FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" LineSpacing="16"  Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
       <String>\{bo}
               %((@c:FlightPlanIsActiveApproach))
          %{if}%(l0 1 + (>@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}%(l0 1 + (>@c:FlightPlanWaypointIndex) @position)
               %((@c:FlightPlanWaypointIdent))%!s!
               %{end}
       </String>
         <Axis X="-10" Y="-4"/>
     </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 Left="0" Right="654" Top ="50" Bottom="458" />
         </Element>
           <Shift>
             <Value>@shift1</Value>
               <Nonlinearity>
                  <Item Value="-20" Y=  "33"/>
                  <Item Value=   "0" Y="360"/>
                  <Item Value= "20" Y="687"/>
               </Nonlinearity>
           </Shift>
           <Shift>
             <Value>@shift2</Value>
               <Nonlinearity>
                  <Item Value="-20" X=   "0"/>
                  <Item Value=   "0" X="327"/>
                  <Item Value= "20" X="654"/>
               </Nonlinearity>
           </Shift>
               <Clip Left="0" Right="654" Top ="50" Bottom="458" />
   </Element>   
  
<!-- WP 2 -->
   <Element>
     <FormattedText X="100" Y="40" Bright="Yes" FontSize="12" Font="Arial" LineSpacing="16"  Adjust="left" Color="%('#ff00ff' 'silver' (@c:FlightPlanisActiveWaypoint) ?)" VerticalAdjust="Center">
       <String>\{bo}
               %((@c:FlightPlanIsActiveApproach))
          %{if}%(l0 2 + (>@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}%(l0 2 + (>@c:FlightPlanWaypointIndex) @position)
               %((@c:FlightPlanWaypointIdent))%!s!
               %{end}
       </String>
         <Axis X="-10" Y="-4"/>
     </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 Left="0" Right="654" Top ="50" Bottom="458" />
         </Element>
           <Shift>
             <Value>@shift1</Value>
               <Nonlinearity>
                  <Item Value="-20" Y=  "33"/>
                  <Item Value=   "0" Y="360"/>
                  <Item Value= "20" Y="687"/>
               </Nonlinearity>
           </Shift>
           <Shift>
             <Value>@shift2</Value>
               <Nonlinearity>
                  <Item Value="-20" X=   "0"/>
                  <Item Value=   "0" X="327"/>
                  <Item Value= "20" X="654"/>
               </Nonlinearity>
           </Shift>
               <Clip Left="0" Right="654" Top ="50" Bottom="458" />
   </Element>
 
Messages
122
Country
russia
I'm assuming that your instrument is written in FS9 Syntax code .

Hi, Karol! Thanks for response! I almost do it!:)
But i have problem with zoom and shift. First - when i zoom in map for see more waypoints and larger map space - distance from waipoints are zoom out. Second - I don't inderstand how to make a shift, because waypoints are not in flightplan line.

Forgot: <Macro Name="CalculateZoomFactor"> - is not working, i was try to change it and make many diffrent but nothing changed in zoom and then i was delete this line.

Here is a working code, but it needs a few fixes.
Code:
 <!-- КУРС Mode-->
<Element>
  <Visible>(L:MFD SWITCH, enum) 2 ==</Visible>
  <Position X="0" Y="0"/>
   <Image Name="KINO_KURS_Background.bmp" Bright="Yes" ImageSizes="299,299"/>
   <Container/>
    <Macro Name="c">C:fs9gps</Macro>

<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:ND_ZOOM, number) * * -1 *
</Macro>

<Macro Name="shift2">
(@c:GeoCalcBearing,radians) (A:PLANE HEADING DEGREES TRUE,radians) -
sin (@c:GeoCalcDistance,nmiles) (L:ND_ZOOM, number) * *
</Macro>

<Macro Name="CalculateZoomFactor"> 960000 480000 240000 120000 60000 30000 15000 7500 0 8 @1 case</Macro>

<Macro Name="eta">
%((@c:FlightPlanWaypointETA,hours) flr 100 % )%!02d!%((@c:FlightPlanWaypointETA,minutes) flr 60 %)%!02d!z
</Macro>

<!--  КАРТА -->
    <Element Name="Map">
    <Visible>(L:ND_ZOOM, number) 0 &gt;</Visible>
    <MaskImage Name="KINO_MASK.bmp" ImageSizes="299,299">
    </MaskImage>
    <Position X="0" Y="0"/>
     <CustomDraw Name="fs9gps:map" X="299" Y="299"
        FlightPlanLineWidth="2" Bright="Yes"
        ActiveColorLayerFlightPlan="0x7010B0"
        PastColorLayerFlightPlan="0xffffff"
        ColorLayerFlightPlan="0x7010B0"
        ColorLayerVORs="0x00ff00"
        ColorLayerNDBs="0x00ff00"
        ColorLayerIntersectionsEnroute="0xffffff"
        ColorLayerIntersectionsTerminal="0xffffff"
        ColorLayerIntersections="0xffffff"
        CenterX="150" CenterY="260">
                <Zoom>960000 480000 240000 120000 60000 30000 15000 7500 8 (L:ND_ZOOM, number) case</Zoom>
                <Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
        <Longitude>(A:GPS POSITION LON, Radians)</Longitude>
        <Heading>(A:GPS GROUND TRUE HEADING, Radians)</Heading>  //GPS GROUND TRUE TRACK
        <DetailLayerTerrain>1</DetailLayerTerrain>
        <DetailLayerAirports>1 2 2 3 3 4 4 5 8 (L:ND_ZOOM, number) case</DetailLayerAirports>
        <DetailLayerFlightPlan>-1</DetailLayerFlightPlan>
        <LayerFlightPlan>1</LayerFlightPlan>
        <LayerAirports>(L:ND_AIRPORT, bool)</LayerAirports>
        <LayerVORs>(L:ND_VOR, bool)</LayerVORs>
        <LayerNDBs>(L:ND_NDB, bool)</LayerNDBs>
        <LayerIntersections>(L:ND_WPT, bool)</LayerIntersections>
        <ObjectDetailLayerAirports>0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F (L:ND_ZOOM, number) case</ObjectDetailLayerAirports>
        <ObjectDetailLayerFlightPlan>15 15 15 15 15 15 15 15 (L:ND_ZOOM, number) case</ObjectDetailLayerFlightPlan>
        <TextDetailLayerAirports>(L:ND_AIRPORT, bool)</TextDetailLayerAirports>
        <TextDetailLayerVORs>(L:ND_VOR, bool)</TextDetailLayerVORs>
        <TextDetailLayerNDBs>(L:ND_NDB, bool)</TextDetailLayerNDBs>
        <TextDetailLayerIntersections>(L:ND_WPT, bool)</TextDetailLayerIntersections>
        <TextColorLayerIntersections>0xffffff</TextColorLayerIntersections>
        <TextColorLayerAirports>0xffffff</TextColorLayerAirports>
        <TextColorLayerNDBs>0x00ff00</TextColorLayerNDBs>
        <TextColorLayerFlightPlan>0xffffff</TextColorLayerFlightPlan>
        <ColorLayerAirportsTowered>0xffffff</ColorLayerAirportsTowered>
        <LayerVehicles>1</LayerVehicles>
        <DetailLayerVehicles>2</DetailLayerVehicles>
        <TextDetailLayerVehicles>1</TextDetailLayerVehicles>
        <ObjectDetailLayerVehicles>0x2 0x4 0x10</ObjectDetailLayerVehicles>
        <ColorLayerVehicles>(@g:setup_ColorTerrain) 1 == if{ 0x006666 } els{ 0x44ffff }</ColorLayerVehicles>
        <TextColorLayerVehicles>0xffffff</TextColorLayerVehicles>
        <TrackUp>1</TrackUp>
        </CustomDraw>
        <Clip/>

    </Element>

  <!-- ДУГА -->
            <Element>
                <Position X="149" Y="260" />
                <CustomDraw Name="fs9gps:rose" X="299" Y="430" CenterX="149" CenterY="214" Radius="214"  LineWidth="2" Font="Tu2X4_VSS" Bold="Yes" FontSize="10" BigFontSize="9" Bright="Yes">
                    <Color>0xF0D0D0</Color>
                    <Heading>(A:PLANE HEADING DEGREES MAGNETIC, Radians)</Heading>
                    <Pivot X="149" Y="214" />
                </CustomDraw>
            </Element>

WP -1

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="8" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%((@c:FlightPlanActiveApproachWaypoint) s0 1 - (>@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) s0 1 - (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "60"/>
<Item Value=   "0" Y="160"/>
<Item Value= "20" Y="260"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="127"/>
<Item Value= "20" X="254"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

WP Active

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="8" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="Magenta" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 (>@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}%(l0 (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="Magenta" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "55"/>
<Item Value=   "0" Y="160"/>
<Item Value= "20" Y="265"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "22"/>
<Item Value=   "0" X="127"/>
<Item Value= "20" X="232"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

WP 1

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="8" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 1 + (>@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}%(l0 1 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "55"/>
<Item Value=   "0" Y="160"/>
<Item Value= "20" Y="265"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "22"/>
<Item Value=   "0" X="127"/>
<Item Value= "20" X="232"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

WP 2

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="8" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 2 + (>@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}%(l0 2 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "55"/>
<Item Value=   "0" Y="160"/>
<Item Value= "20" Y="265"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "22"/>
<Item Value=   "0" X="127"/>
<Item Value= "20" X="232"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

WP 3

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="8" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 3 + (>@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}%(l0 3 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "55"/>
<Item Value=   "0" Y="160"/>
<Item Value= "20" Y="265"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "22"/>
<Item Value=   "0" X="127"/>
<Item Value= "20" X="232"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

     <!-- TCAS-->
     <Element>
<MaskImage Name="KINO_MASK.bmp" ImageSizes="299,299">
    </MaskImage>
     <Visible>(L:ND_ZOOM, number) 0 &gt;</Visible>
     <Position X="0" Y="0"/>
     <CustomDraw Name="fs9traffic:tcas" X="299" Y="299" CenterX="150" CenterY="260" SymbolSize="3.5"
               OtherColour="0x7fffff" ProximityColour="0x7fffff"
                MaxDispNumAct="15" MaxRange="700" >
                <Heading>(A:PLANE HEADING DEGREES MAGNETIC, degrees)</Heading>
                <Range>690 690 345 172 86 43 22 10 5 8 (L:ND_ZOOM, number) case</Range>
                <Brightness> (C:fs9traffic:Brightness,number) 127 max 255 min  d (&gt;C:fs9traffic:brightness,number)</Brightness>
            </CustomDraw>
    </Element>
2018-11-4_16-34-17-713.jpg
 
Last edited:
Messages
542
Country
australia
Hi Alexey

That looks good .

I will look at your code and try to fix , Zoom , Shift , and Clip .
It might take a day or two before I reply .

Could you please provide a copy of the Mouse code that controls or switches the Zoom In and Out ?

Cheers
Karol
 
Messages
122
Country
russia
I will look at your code and try to fix , Zoom , Shift , and Clip .
It might take a day or two before I reply .

Thank you Karol! Now i change Shift and GeoCalcDistance to kilometrs and waypionts almost fell into place, but it's only in zoom by 20km, with other zoom factors everything is not so good. I think need to reverse zoom in macros, but I still can not understand how. Also add a Clip, but in future i think it will be need to make a mask.

Code:
 <!-- КУРС Mode-->
 <Element>
  <Visible>(L:MFD SWITCH, enum) 2 ==</Visible> 
  <Position X="0" Y="0"/>
   <Image Name="KINO_KURS_Background.bmp" Bright="Yes" ImageSizes="299,299"/>
   <Container/>
    <Macro Name="c">C:fs9gps</Macro> 

<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,kilometers) (L:ND_ZOOM, number) * * -1 *
</Macro>

<Macro Name="shift2">
(@c:GeoCalcBearing,radians) (A:PLANE HEADING DEGREES TRUE,radians) -
sin (@c:GeoCalcDistance,kilometers) (L:ND_ZOOM, number) * *
</Macro>

<Macro Name="CalculateZoomFactor"> 960000 480000 240000 120000 60000 30000 15000 7500 8 @8 case</Macro>

<Macro Name="eta">
%((@c:FlightPlanWaypointETA,hours) flr 100 % )%!02d!%((@c:FlightPlanWaypointETA,minutes) flr 60 %)%!02d!z
</Macro>

 <!--  КАРТА -->
    <Element Name="Map">

    <MaskImage Name="KINO_MASK.bmp" ImageSizes="299,299">
    </MaskImage>
    <Position X="0" Y="0"/>
     <CustomDraw Name="fs9gps:map" X="299" Y="299"
        FlightPlanLineWidth="2" Bright="Yes"
        ActiveColorLayerFlightPlan="0x7010B0"
        PastColorLayerFlightPlan="0xffffff"
        ColorLayerFlightPlan="0x7010B0"
        ColorLayerVORs="0x00ff00"
        ColorLayerNDBs="0x00ff00"
        ColorLayerIntersectionsEnroute="0xffffff"
        ColorLayerIntersectionsTerminal="0xffffff"
        ColorLayerIntersections="0xffffff"
        CenterX="150" CenterY="260">
                <Zoom>960000 480000 240000 120000 60000 30000 15000 7500 8 (L:ND_ZOOM, number) case</Zoom>
                <Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
        <Longitude>(A:GPS POSITION LON, Radians)</Longitude>
        <Heading>(A:GPS GROUND TRUE HEADING, Radians)</Heading>  //GPS GROUND TRUE TRACK
        <DetailLayerTerrain>1</DetailLayerTerrain>
        <DetailLayerAirports>1 2 2 3 3 4 4 5 8 (L:ND_ZOOM, number) case</DetailLayerAirports>
        <DetailLayerFlightPlan>-1</DetailLayerFlightPlan>
        <LayerFlightPlan>1</LayerFlightPlan>
        <LayerAirports>(L:ND_AIRPORT, bool)</LayerAirports>
        <LayerVORs>(L:ND_VOR, bool)</LayerVORs>
        <LayerNDBs>(L:ND_NDB, bool)</LayerNDBs>
        <LayerIntersections>(L:ND_WPT, bool)</LayerIntersections>
        <ObjectDetailLayerAirports>0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F (L:ND_ZOOM, number) case</ObjectDetailLayerAirports>
        <ObjectDetailLayerFlightPlan>15 15 15 15 15 15 15 15 (L:ND_ZOOM, number) case</ObjectDetailLayerFlightPlan>
        <TextDetailLayerAirports>(L:ND_AIRPORT, bool)</TextDetailLayerAirports>
        <TextDetailLayerVORs>(L:ND_VOR, bool)</TextDetailLayerVORs>
        <TextDetailLayerNDBs>(L:ND_NDB, bool)</TextDetailLayerNDBs>
        <TextDetailLayerIntersections>(L:ND_WPT, bool)</TextDetailLayerIntersections>
        <TextColorLayerIntersections>0xffffff</TextColorLayerIntersections>
        <TextColorLayerAirports>0xffffff</TextColorLayerAirports>
        <TextColorLayerNDBs>0x00ff00</TextColorLayerNDBs>
        <TextColorLayerFlightPlan>0xffffff</TextColorLayerFlightPlan>
        <ColorLayerAirportsTowered>0xffffff</ColorLayerAirportsTowered>
        <LayerVehicles>1</LayerVehicles>
        <DetailLayerVehicles>2</DetailLayerVehicles>
        <TextDetailLayerVehicles>1</TextDetailLayerVehicles>
        <ObjectDetailLayerVehicles>0x2 0x4 0x10</ObjectDetailLayerVehicles>
        <ColorLayerVehicles>(@g:setup_ColorTerrain) 1 == if{ 0x006666 } els{ 0x44ffff }</ColorLayerVehicles>
        <TextColorLayerVehicles>0xffffff</TextColorLayerVehicles>
        <TrackUp>1</TrackUp>
        </CustomDraw>
        <Clip/>

    </Element>

  <!-- ДУГА -->
            <Element>
                <Position X="149" Y="260" />
                <CustomDraw Name="fs9gps:rose" X="299" Y="430" CenterX="149" CenterY="214" Radius="214"  LineWidth="2" Font="Tu2X4_VSS" Bold="Yes" FontSize="10" BigFontSize="9" Bright="Yes">
                    <Color>0xF0D0D0</Color>
                    <Heading>(A:PLANE HEADING DEGREES MAGNETIC, Radians)</Heading>
                    <Pivot X="149" Y="214" />
                </CustomDraw>
            </Element>

WP -1

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%((@c:FlightPlanActiveApproachWaypoint) s0 1 - (>@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) s0 1 - (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "50"/>
<Item Value=   "0" Y="260"/>
<Item Value= "20" Y="350"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="148"/>
<Item Value= "20" X="299"/>
</Nonlinearity>
</Shift>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>

WP Active

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="Magenta" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 (>@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}%(l0 (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="Magenta" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "50"/>
<Item Value=   "0" Y="260"/>
<Item Value= "20" Y="320"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="148"/>
<Item Value= "20" X="299"/>
</Nonlinearity>
</Shift>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>

WP 1

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 1 + (>@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}%(l0 1 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "50"/>
<Item Value=   "0" Y="260"/>
<Item Value= "20" Y="320"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="148"/>
<Item Value= "20" X="299"/>
</Nonlinearity>
</Shift>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>

WP 2

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 2 + (>@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}%(l0 2 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "50"/>
<Item Value=   "0" Y="260"/>
<Item Value= "20" Y="320"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="148"/>
<Item Value= "20" X="299"/>
</Nonlinearity>
</Shift>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>

WP 3

<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="0xffffff" VerticalAdjust="Center">
<String>\{bo}
%((@c:FlightPlanIsActiveApproach))
%{if}%(l0 3 + (>@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}%(l0 3 + (>@c:FlightPlanWaypointIndex) @position)
%((@c:FlightPlanWaypointIdent))%!s!
%{end}
</String>
<Axis X="-10" Y="4"/>
</FormattedText>
<Element>
<Circle Color="0xffffff" Bright="Yes" Radius="2" LineWidth="1"></Circle>
<Clip Left="2" Right="298" Top ="50" Bottom="270"/>
</Element>
<Shift>
<Value>@shift1</Value>
<Nonlinearity>
<Item Value="-20" Y=  "50"/>
<Item Value=   "0" Y="260"/>
<Item Value= "20" Y="320"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>@shift2</Value>
<Nonlinearity>
<Item Value="-20" X=   "0"/>
<Item Value=   "0" X="148"/>
<Item Value= "20" X="299"/>
</Nonlinearity>
</Shift>
<Clip/>
</Element>

     <!-- TCAS-->
     <Element>
<MaskImage Name="KINO_MASK.bmp" ImageSizes="299,299">
    </MaskImage>
     <Visible>(L:ND_ZOOM, number) 0 &gt;</Visible>
     <Position X="0" Y="0"/>
     <CustomDraw Name="fs9traffic:tcas" X="299" Y="299" CenterX="150" CenterY="260" SymbolSize="3.5"
               OtherColour="0x7fffff" ProximityColour="0x7fffff"
                MaxDispNumAct="15" MaxRange="700" >
                <Heading>(A:PLANE HEADING DEGREES MAGNETIC, degrees)</Heading>
                <Range>690 690 345 172 86 43 22 10 5 8 (L:ND_ZOOM, number) case</Range>
                <Brightness> (C:fs9traffic:Brightness,number) 127 max 255 min  d (&gt;C:fs9traffic:brightness,number)</Brightness>
            </CustomDraw>
    </Element>

2018-11-4_18-22-2-845.jpg


And here is a code of zoom gauge. (DIAPAZ_10 - is 10km, DIAPAZ_20 - 20km etc)
Code:
<Gauge Name="PU_SEI" Version="1.0">
   <Image Name="PU_SEI_BKG.bmp" Briht="no"/>
   <Element>
      <Select>
         <Value>(L:MFD SWITCH, enum) 2 ==  if{ 1 (&gt;L:ND_CRS, bool)</Value>
      </Select>
   </Element>
   <Element>
      <Position X="81" Y="273"/>
      <Select>
         <Value>(L:ND_ZOOM, number)</Value>
         <Case Value="0">
            <Image Name="DIAPAZ_10.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="DIAPAZ_20.bmp"/>
         </Case>
         <Case Value="2">
            <Image Name="DIAPAZ_40.bmp"/>
         </Case>
         <Case Value="3">
            <Image Name="DIAPAZ_80.bmp"/>
         </Case>
         <Case Value="4">
            <Image Name="DIAPAZ_160.bmp"/>
         </Case>
         <Case Value="5">
            <Image Name="DIAPAZ_320.bmp"/>
         </Case>
         <Case Value="6">
            <Image Name="DIAPAZ_640.bmp"/>
         </Case>
         <Case Value="7">
            <Image Name="DIAPAZ_1280.bmp"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Position X="83" Y="441"/>
      <Select>
         <Value>(L:MFD SWITCH, enum)</Value>
         <Case Value="0">
            <Image Name="KINO_RN_1.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="SEVER.bmp"/>
         </Case>
         <Case Value="2">
            <Image Name="KURS_2.bmp"/>
         </Case>
         <Case Value="3">
            <Image Name="MNRLS_3.bmp"/>
         </Case>
         <Case Value="4">
            <Image Name="SPPZ_4.bmp"/>
         </Case>
         <Case Value="5">
            <Image Name="SPS_6.bmp"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Position X="68" Y="735"/>
      <Select>
         <Value>(L:RMI 1 Select, enum)</Value>
         <Case Value="1">
            <Image Name="PU_SEI_kn_ON.bmp" Bright="Yes" ImageSizes="70,17"/>
         </Case>
      </Select>
   </Element>
   <Element>
      <Position X="160" Y="735"/>
      <Select>
         <Value>(L:RMI 2 Select, enum)</Value>
         <Case Value="1">
            <Image Name="PU_SEI_kn_ON.bmp" Bright="Yes" ImageSizes="70,17"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Area Left="64" Top="683" Width="73" Height="71">
         <Tooltip ID="">APK1/VOR1</Tooltip>
         <Cursor Type="Hand"/>
         <Click>(L:RMI 1 Select, enum) ++ 2 % (&gt;L:RMI 1 Select, enum) 1 (>L:KNOB_QW,bool)</Click>
      </Area>
      <Area Left="158" Top="687" Width="73" Height="71">
         <Tooltip ID="">APK2/VOR2</Tooltip>
         <Cursor Type="Hand"/>
         <Click>(L:RMI 2 Select, enum) ++ 2 % (&gt;L:RMI 2 Select, enum) 1 (>L:KNOB_QW,bool)</Click>
      </Area>
      <Area Left="81" Top="273" Width="123" Height="123">
         <Area Right="61">
            <Cursor Type="DownArrow"/>
            <Click>(L:ND_ZOOM, number) 1 - (&gt;L:ND_ZOOM, number) (L:ND_ZOOM, number) 0 &lt; if{ 0 (&gt;L:ND_ZOOM, number) }</Click>
         </Area>
         <Area Left="61">
            <Cursor Type="UpArrow"/>
            <Click>(L:ND_ZOOM, number) 1 + (&gt;L:ND_ZOOM, number) (L:ND_ZOOM, number) 7 &gt; if{ 7 (&gt;L:ND_ZOOM, number) }</Click>
         </Area>
      </Area>
      <Area Left="83" Top="441" Width="123" Height="123">
         <Area Right="61">
            <Cursor Type="DownArrow"/>
            <Click>(L:MFD SWITCH, enum) 1 - (&gt;L:MFD SWITCH, enum) (L:MFD SWITCH, enum) 0 &lt; if{ 0 (&gt;L:MFD SWITCH, enum) }</Click>
         </Area>
         <Area Left="61">
            <Cursor Type="UpArrow"/>
            <Click>(L:MFD SWITCH, enum) 1 + (&gt;L:MFD SWITCH, enum) (L:MFD SWITCH, enum) 5 &gt; if{ 5 (&gt;L:MFD SWITCH, enum) }</Click>
         </Area>
      </Area>
   </Mouse>
</Gauge>
 
Messages
542
Country
australia
Hi Alexey

Regards Clip .

Where you have ,
Code:
<Clip/>

Replace it with ,
Code:
<Clip Left="0" Right="299" Top ="0" Bottom="299" />

Thanks for the Zoom switch code .
Will look at the zoom function .

Cheers
Karol
 
Top