• 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.

Mark Position

Messages
542
Country
australia
Some military aircraft have a "MARK POSITION" facility whereby the pilot clicks a button
and the aircraft's exact position at that instant is frozen and stored.
That mark position can be used for a variety of purposes , including subsequent guidance to
return to that exact location.

I have created that type of arrangement , it comprises of a 'Mark button' and a
separate 'Display.
I also did a separate 'Demo' version of both which has expanded features , the full code is below.

The following screenshot shows both sets ,
Pink boxed is the 'DEMO' version.
Orange boxed is the version installed in my panel.

The installed version MARK button functions are.
LEFT single click = captures and stores the aircraft's instantaneous position , opens the display and GEOCALC and stores other parameters.
MIDDLE single click = sets the previously stored Lat/Long to STAND OFF format to enable
the Radar Mode 6 display to be locked and centered at the Mark position , the
Mark position at the radar focal point can then be clicked for Radar Pick Up and appears in the
Lat/Long entry page of the Mission Adaptive Flight Plan Editor at the left of the shot , it
can then be entered into a flight plan or DTO if desired .
RIGHT single click = Off switch .

The screenshot was taken during an ILS approach at YAMB , the reason being , it provides
adequate data to compare with the data presented in the Mark Display at left of shot .
'Edit' In this shot the "MARK POSITION' was entered at a point on the runway between the
Red/White approach guidance light array ( it's 2.1nm from aircraft ).

zrnUT.jpg


Further details will be in next post.

Cheers
Karol
 
Last edited:
The following details the previously mentioned Mark Position instrument.
The following can be used , distributed or modified or adapted without any restrictions .

No Bitmaps required , just copy both instruments into two xml , add to panel cfg
and test them.

Cheers
Karol

Function details.

UKsqz.jpg



Mark button , full instrument code.

Code:
<Gauge Name="MARK POSITION Switch" Version="1.0">
<Size X="28" Y="24" />
<!--BUTTONS-->
    <Element Name="SWITCH RECTANGLE">  
        <Position X="0" Y="0"/>
        <Rectangle Width="28" Height="24" LineWidth="2" Color="#363636" FillColor="#060906" Bright="Yes"/>      
    </Element>

    <Element Name="OFF BUTTON">
        <Position X="0" Y="0"/>
        <Visible>(L:Mark Select switch,enum) 0 ==</Visible>      
      <Element>  
        <Position X="3" Y="3"/>
        <Rectangle Width="24" Height="20" LineWidth="3" Color="#060906" FillColor="#666968" Bright="Yes"/>      
      </Element>
       <Element>
         <Position X="4" Y="7" />
        <Text X="20" Y="10" Bright="Yes" Length="2" Font="tahoma" Color="#A1A9A6" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
              <String>%MK%</String>
          </Text>
       </Element>     
    </Element>

    <Element Name="ON BUTTON">
        <Position X="0" Y="0"/>
        <Visible>(L:Mark Select switch,enum) 1 ==</Visible>  
      <Element>
        <Position X="3" Y="3"/>
        <Rectangle Width="24" Height="20" LineWidth="3" Color="#060906" FillColor="#68AE6B" Bright="Yes"/>      
      </Element>
       <Element>
         <Position X="4" Y="7" />
        <Text X="20" Y="10" Bright="Yes" Length="2" Font="tahoma" Color="#C0C0C0" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
              <String>%MK%</String>
          </Text>
       </Element>    
    </Element>  

   <Mouse>
     <Area Left="0" Top="0" Width="28" Height="24">
      <Click Kind="LeftSingle+RightSingle" Repeat="Yes">
        (M:Event) 'LeftSingle' scmp 0 ==  if{ 1 (&gt;L:Mark Select switch,enum)
                                              1    (&gt;L:Mark View,enum)
                                              (A:PLANE LATITUDE, degrees) (&gt;L:MarkPositionLatitude,degrees)
                                              (A:PLANE LONGITUDE, degrees) (&gt;L:MarkPositionLongitude,degrees)
                                              (A:Indicated Altitude, feet) (&gt;L:Saved Altitude, feet)
                                              360 (A:Plane heading degrees gyro, degrees) dnor near d 0 == ? (&gt;L:HEADINGsavedMarkPos, degrees)
                                              (A:GROUND ALTITUDE, feet) (&gt;L:MarkGROUND ALTITUDE, feet) }
        (M:Event) 'RightSingle' scmp 0 == if{ 0 (&gt;L:Mark Select switch,enum)
                                              0    (&gt;L:Mark View,enum) }</Click>
      <Tooltip>Mark Position +/-</Tooltip>             
      <Cursor Type="Hand" />
    </Area>
   </Mouse>   
</Gauge>


Mark position display , full instrument code .

Code:
<Gauge Name="MARK TEST DISPLAY" Version="1.0">
<Size X="100" Y="145" />  
//By Karol Chlebowski @ 2014 **
<Macro Name="c">C:fs9gps</Macro>
<Macro Name="C">C:fs9gps</Macro>
<Update Frequency="18"/>
<Update>
    (L:Mark View,enum) 1 ==
         if{
           (L:MarkPositionLatitude, degrees) (>@c:GeoCalcLatitude1,degrees)
           (L:MarkPositionLongitude, degrees) (>@c:GeoCalcLongitude1,degrees)
           (A:PLANE LATITUDE,degrees) (>@c:GeoCalcLatitude2,degrees)
           (A:PLANE LONGITUDE,degrees) (>@c:GeoCalcLongitude2,degrees)
             (@c:GeoCalcBearing,degrees) (>L:BearingMarkPos,degrees)
             (@c:GeoCalcDistance,nmiles) (>L:DistanceMarkPos,nmiles)
            }  
</Update>

    <Element Name="MARK RECTANGLE">  
        <Position X="0" Y="0"/>
        <Rectangle Width="100" Height="145" FillColor="#292929" Bright="Yes"/>          
    </Element>  
<!-- Mark Position display = Refer GEOCALC above  and  MARK POSITION switch  for Lat/Long capture-->
    
       <Element>
          <Position X="4" Y="6"/>
             <Text X="76" Y="15" Bright="Yes" Length="15" Font="Tahoma" FontSize="11" Color="#76FF4F" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                <String>%Mark Position%</String>
             </Text>
       </Element>
     
     <Element>
          <Visible>(L:Mark View,enum) 1 ==</Visible>
<!--Defining and declaring TIME  To/From  Mark Position  Invisible colour-->              
            <Element>
              <Position X="1" Y="1"/>
              <Text X="1" Y="1" Bright="Yes" Length="3" Font="Arial" Color="0x000000" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                <String>%((L:DistanceMarkPos,nmiles) (A:GROUND VELOCITY, knots) / 3600 * (&gt; L:MARK ETE,seconds))%!02d!%</String>
              </Text>
            </Element>
<!--ON condition TEXT display-->
       <Element>
          <Position X="7" Y="19"/>
            <FormattedText X="81" Y="125" Font="Tahoma" FontSize="11" LineSpacing="11" Adjust="Left" Color="#2F912F" Bright="Yes">
              <String>%Mk Hdg %((L:HEADINGsavedMarkPos, degrees))%!03d!%
                     \n%BRG %((L:BearingMarkPos,degrees) (A:GPS MAGVAR, degrees) - 180 - d360)%!03d!%
                     \n%DIST %((L:DistanceMarkPos,nmiles) 1.59 &lt;)%{if}%((L:DistanceMarkPos,nmiles) 6076 *)%!4d!%ft%((L:DistanceMarkPos,nmiles) 1.60 &gt;)%{else}%((L:DistanceMarkPos,nmiles))%!4.1f!\{dpl=nm}%{end}%
                     \n%((L:MARK ETE,seconds) 3600 % 60 / int flr 60 %)%!02d! : %((L:MARK ETE,seconds) 60 % int flr 60 %)%!02d!%
                     \n\n%GS %((A:Indicated Altitude, feet) (L:MarkGROUND ALTITUDE, feet) - (L:DistanceMarkPos,nmiles) 6076 * / atg rddg ) %!5.2f!%
                     \n%S-Ht %((A:Indicated Altitude, feet) (L:MarkGROUND ALTITUDE, feet) - )%!5d!%
                     \n%G Elev %((L:MarkGROUND ALTITUDE, feet))%!5d!%
                     \n%Mk Alt %((L:Saved Altitude, feet))%!3d!%
                     \n%((L:ACPOS, number))%{case}%{:0}%((L:MarkPositionLatitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % flr r flr 'N' 'S' l0 ? )%!s!%!02.0f!%\{dplo= } %!02.0f!%' %!02.0f!%"%{:1}%((L:MarkPositionLatitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % r flr 'N' 'S' l0 ? )%!s!%!02.0f!%\{dplo= } %!07.4f!%' %{:2}%((L:MarkPositionLatitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % r flr 'N' 'S' l0 ? )%!s!%((L:MarkPositionLatitude, degrees) abs )%!09.6f!%\{dplo= }%{end}%
                     \n%((L:ACPOS, number))%{case}%{:0}%((L:MarkPositionLongitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % flr r flr 'E' 'W' l0 ? )%!s!%!03.0f!%\{dplo= } %!02.0f!%' %!02.0f!%"%{:1}%((L:MarkPositionLongitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % r flr 'E' 'W' l0 ? )%!s!%!03.0f!%\{dplo= } %!07.4f!%' %{:2}%((L:MarkPositionLongitude, degrees) d 0 &gt;= s0 r abs d 3600 * 60 % r d 60 * 60 % r flr 'E' 'W' l0 ? )%!s!%((L:MarkPositionLongitude, degrees) abs )%!010.6f!%\{dplo= }%{end}%
                    </String>
          </FormattedText>
       </Element>

<!--Steering Arrow TO    Mark Position-->        
       <Element>
          <Position X="85" Y="48"/>
            <Polygon Color="#CC8800" FillColor="#CC8800" LineWidth="1.5" Bright="Yes">   #CC8800
               <Point X="0" Y="10"/>
               <Point X="0" Y="0"/>
               <Point X="3" Y="0"/>
               <Point X="0" Y="-10"/>
               <Point X="-2" Y="0"/>
               <Point X="0" Y="0"/>
            </Polygon>
           <Rotate>
             <Value>(L:BearingMarkPos, radians) (A:PLANE HEADING DEGREES GYRO, radians) - (A:GPS MAGVAR, radians) - pi + </Value>
           </Rotate>
       </Element>
<!--Current aircraft Heading  index-->      
       <Element>
         <Position X="83" Y="25" />
        <Text X="12" Y="12" Bright="Yes" Length="1" Font="tahoma" Color="#2F912F" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
              <String>%v%</String>
          </Text>
       </Element>
<!--Heading at MARK instant Arrow-->     
       <Element>
          <Position X="85" Y="48"/>
            <Polygon Color="#676767" LineWidth="1.5" Bright="Yes">
               <Point X="-1" Y="12"/>
               <Point X="2" Y="12"/>
               <Point X="2" Y="0"/>
               <Point X="6" Y="0"/>
               <Point X="0" Y="-13"/>
               <Point X="-4" Y="0"/>
               <Point X="-1" Y="0"/>
               <Point X="-1" Y="12"/>
            </Polygon>
           <Rotate>
             <Value>(L:HEADINGsavedMarkPos, radians) (A:PLANE HEADING DEGREES GYRO, radians) -</Value>
           </Rotate>
       </Element>     
     </Element>  
<!--Off condition display-->   
     <Element>
          <Visible>(L:Mark View,enum) 0 ==</Visible>    
       <Element>
          <Position X="4" Y="23"/>
            <FormattedText X="81" Y="48" Font="Tahoma" FontSize="11" LineSpacing="16" Adjust="Right" Color="#2F912F" Bright="Yes">
              <String>%NO  %
                     \n%ENTRY%</String>
          </FormattedText>
       </Element>
    </Element>  
      
</Gauge>
 
Last edited:
Sounds like you really got to know how this function works to build it. i have a question. The demo has 1 button. So seems the real one would not have middle click or right click.
Maybe it has a cycle button?

i will save this in case i ever need this type of code or use the logic for others..Thanks!
 
Last edited:
When you create an instrument or feature you try to get the maximum utility out of it.
I used the Middle single click in my panel to transition the Mark point to a Stand off feature
that I have in my radar , that way I can easily enter it into a flight plan if I want to.

If by 'real one' you mean , in the real world aircraft , with modern computers and software
they can do anything that they might want to do.
I have seen examples of a real world MFD with over half a dozen Mark positions , but the problem is that
you have to add an identifier to work out which you want to call up.
Same applies to switches , you can have multi mode switches.

For the Sim you could change it to a cycle button , but you must remember that even cycle buttons can
have a huge number of cases.

Cheers
Karol
 
Back
Top