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

Map Panning????

Messages
278
Country
ca-britishcolumbia
Just me again....

I have created another map in my gauge to mimick the FSX Map feature. All it does is display airports, NDB's and VOR's. I applied the panning code and after some grief with it flipping the map, got it working to where it will pan. The issue... you hit one of the pan buttons and it moves the map, but instantly brings it back to center. Is there something I am missing to get it to stay where you pan?

Map Section:
Code:
<Element Name="MainMapPage">
      <Visible>(L:MapPage,bool)</Visible>
      <Position X="100.0" Y="94.5"/>
      <Element Name="MainMap">
        <CustomDraw Name="fs9gps:2:map" X="600" Y="550" LayerBorders="Yes" LayerFlightPlan="No" FlightPlanLineWidth="2.0" Bright="Yes">
        <CenterX>300</CenterX>
        <CenterY>275</CenterY> 
[COLOR="Red"]        <Zoom>(L:map_ZoomFactor,number) 1852.0 *</Zoom>
        <PanReset>(L:TerrainPanning, enum) !</PanReset>
        <PanVertical>(L:PanVert,enum) 100 *</PanVertical>
        <PanHorizontal>(L:PanHorz,enum) 100 *</PanHorizontal>
        <TrackUp>0</TrackUp>[/COLOR]
        <Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
        <Longitude>(A:GPS POSITION LON, Radians)</Longitude>
        <Heading>(A:Plane heading degrees true, radians)</Heading>
        <DetailLayerTerrain>3</DetailLayerTerrain>
        <DetailLayerBorders>1</DetailLayerBorders>
        <DetailLayerAirports>3</DetailLayerAirports>
        <DetailLayerVORs>2</DetailLayerVORs>
        <DetailLayerNDBs>-1</DetailLayerNDBs>
        <DetailLayerILSs>1</DetailLayerILSs>
        <LayerTerrain>1</LayerTerrain>
        <LayerBorders>1</LayerBorders>
        <LayerAirports>1</LayerAirports>
        <LayerVORs>1</LayerVORs>
        <LayerILSs>1</LayerILSs>
        <LayerNDBs>1</LayerNDBs>
        <LayerIntersections>0</LayerIntersections>
and on it goes....

Mouse Section:
Code:
  <Area Left="585.0" Top="425.0" Width="42.5" Height="40">
    <Visible>(L:MapPage,bool)</Visible>
    <Cursor Type="Hand" Repeat="Yes"/>
    <Tooltip>PAN NORTH</Tooltip>
    <Click Repeat="Yes">
      (L:PanVert,enum) 1 - (&gt;L:PanVert,enum) 
    </Click>  
  </Area>
  <Area Left="625.000" Top="482.5" Width="40" Height="42.5">
    <Visible>(L:MapPage,bool)</Visible>
    <Cursor Type="Hand" Repeat="Yes"/>
    <Tooltip>PAN EAST</Tooltip>
    <Click Repeat="Yes">
      (L:PanHorz,enum) 1 + (&gt;L:PanHorz,enum) 
    </Click>  
  </Area>
  <Area Left="585.0" Top="545.0" Width="42.5" Height="40">
    <Visible>(L:MapPage,bool)</Visible>
    <Cursor Type="Hand" Repeat="Yes"/>
    <Tooltip>PAN South</Tooltip>
    <Click Repeat="Yes">
      (L:PanVert,enum) 1 + (&gt;L:PanVert,enum) 
    </Click>  
  </Area>
  <Area Left="545.0" Top="475.0" Width="40" Height="42.5">
    <Visible>(L:MapPage,bool)</Visible>
    <Cursor Type="Hand" Repeat="Yes"/>
    <Tooltip>PAN WEST</Tooltip>
    <Click Repeat="Yes">
      (L:PanHorz,enum) 1 - (&gt;L:PanHorz,enum) 
    </Click>  
  </Area>
  <Area Left="590.0" Top="480.0" Width="30" Height="40">
    <Visible>(L:MapPage,bool)</Visible>
    <Cursor Type="Hand" Repeat="Yes"/>
    <Tooltip>PAN RESET</Tooltip>
    <Click Repeat="Yes">
      (L:TerrainPanning, enum) ! (>L:TerrainPanning, enum) 
    </Click>  
  </Area>

Thanks
Greg
 
The issue... you hit one of the pan buttons and it moves the map, but instantly brings it back to center. Is there something I am missing to get it to stay where you pan?

Remove the ! in

<PanReset>(L:TerrainPanning, enum) !</PanReset>

and see what happens.

And also, I note you use Click Repeat for pan reset. Why? Why don't you just go with <Click Kind="LeftSingle">?
 
Last edited:
Thanks Bob,

Just tried it and no luck :(
It still reverts back to its position.
I tried changing the the Latitude/Longtitude using the (L:Var) and the (E:Var) and removed the <Heading> portion

e.g.
Code:
<Latitude>(E:GPS POSITION LAT, Radians)</Latitude>
<Longitude>(E:GPS POSITION LON, Radians)</Longitude>

Although it worked it placed the map somewhere in the Alantic Ocean and the screen would flicker between blue and green for a period of time before stabilizing the if you ranged it would turn black then blue and green again. I don't know... bit am plugging away at it. The mouse Click Repeat=Yes!!! Copy and paste, missed it thanks for pointing it out.

Greg
 
Thanks Bob,

Just tried it and no luck :(
It still reverts back to its position.
I tried changing the the Latitude/Longtitude using the (L:Var) and the (E:Var) and removed the <Heading> portion

e.g.
Code:
<Latitude>(E:GPS POSITION LAT, Radians)</Latitude>
<Longitude>(E:GPS POSITION LON, Radians)</Longitude>

Although it worked it placed the map somewhere in the Alantic Ocean and the screen would flicker between blue and green for a period of time before stabilizing the if you ranged it would turn black then blue and green again. I don't know... bit am plugging away at it. The mouse Click Repeat=Yes!!! Copy and paste, missed it thanks for pointing it out.

Greg

the pan revert is probably happening because <PanReset> is being triggered, and it wouldn't have anything to do with <Latitude> or <Longitude>. Pan just shifts the map a certain number of physical pixels (screen pix) and it does not rely on a lat/lon to do that.

Something is causing your <PanReset> to trigger when you don't want it to.

one thing I just noticed ... you use PanVert 100* for the pan vertical number. Pan units are physical pixels, so you don't want too much pan.

Bob
 
Last edited:
Thanks again Bob,

If it's there I don't see it. Other than the zoom factor there is nothing really linking the two maps together, so i dont get it. I did notice that when the sim was paused it would pan, but that just makes sense. Still looking for the solution. For the physical pixels, the research i did this seemed to be the norm. thought I would adjust it as necessary when i have it working.

Thanks
Greg
 
I tried the MS radar long ago and the panning function operated as you describe.
The panning moves the display then resets to the original position.
I may be wrong ,but I suspect that it is the coded function inherent in the panning function.

I created a radar with standoff capability by repeating the "Custom Drawing "
code section , each within a separate ennum that is selectable.
The Lat/Long origin is different in each ennum as follows:
1. Aircraft' current position.
2. GPS next waypoint.
HTML:
USUAL
<CustomDrawParam id="Latitude" Name="Latitude">
                            <Value>(A:GPS POSITION LAT, Radians)</Value>
                        </CustomDrawParam>
                        <CustomDrawParam id="Longitude" Name="Longitude">
                            <Value>(A:GPS POSITION LON, Radians)</Value>
                        </CustomDrawParam>

STANDOFF
<CustomDrawParam id="Latitude" Name="Latitude">
                            <Value>(A:GPS WP NEXT LAT, Radians)</Value>
                        </CustomDrawParam>
                        <CustomDrawParam id="Longitude" Name="Longitude">
                            <Value>(A:GPS WP NEXT LON, Radians)</Value>
                        </CustomDrawParam>

Then created a switch to enable the Flight plan Index number to be varied and set .
HTML:
<Gauge Name="SEQ SET" Version="1.0">
//By Karol Chlebowski @ 2012 **
<Update Frequency="18"/>
<Update>
(G:Var1) 0 != if{ (G:Var1) -- (>G:Var1) }
</Update>
<Image Name="SEQ_INS.bmp"/>

  <Element>
    <Visible>(A:Circuit general panel on, bool)</Visible>
      <!--SCREEN-->	
    <!--SEQ  Flight plan legs-->
<!--SEQ - Active leg number - Total legs-->	
	
			<Element>
              <Position X="13" Y="7"/>
              <FormattedText X="59" Y="14" Font="Tahoma" FontSize="9" LineSpacing="12" Adjust="LEFT" Color="#349F34" Bright="Yes" Tabs="0,2R">
                <String>%SEQ   %((A:GPS FLIGHT PLAN WP INDEX, number))%!02d!% - %((A:GPS FLIGHT PLAN WP COUNT, number) 1 -)%!02d!%</String>
              </FormattedText>
            </Element>
	  	 	 
<!--Thumbwheel text display TENS and UNITS-->		
			<Element>
              <Position X="37" Y="35"/>
              <Text X="10" Y="10" Bright="Yes" Length="2" Font="Arial" Color="0xDACEDE" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                <String>%((L:F111_Leg_10s, number))%!d!%</String>
              </Text>
            </Element>
			
			<Element>
              <Position X="53" Y="35"/>
              <Text X="10" Y="10" Bright="Yes" Length="2" Font="Arial" Color="0xDACEDE" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
                <String>%((L:F111_Leg_1s, number))%!d!%</String>
              </Text>
            </Element>
<!--Thumbwheel  SUM defined  for  resetting  active leg at last mouse button-->				
			<Element>
              <Position X="55" Y="3"/>
              <Text X="1" Y="1" Bright="Yes" Length="3" Font="Arial" Color="0x000000" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
				<String>%((L:F111_Leg_10s, number) 10 * (L:F111_Leg_1s, number) + (&gt; L:F111_Leg_Sum, number))%!02d!%</String>
              </Text>
            </Element>
			
			<Element>
              <Position X="3" Y="31" />
               <Select>
               <Value>(G:Var1) 0 !=</Value>
                 <Case Value="1">
                    <Image Name="SEQ.bmp" Bright="1"/>
                 </Case>
               </Select>
            </Element>

	</Element>
	
 <!--==== BOTTOM ROW BUTTONS====-->
 <Mouse>

<Macro Name="Button1">(M:Event) 'RightSingle' scmp 0 == if{ (L:F111_Leg_10s, number) -- 0 max (&gt; L:F111_Leg_10s, number) }
    	(M:Event) 'LeftSingle' scmp 0 ==  if{ (L:F111_Leg_10s, number) ++ 9 min (&gt; L:F111_Leg_10s, number) }
    	(M:Event) 'WheelUp' scmp 0 == if{ (L:F111_Leg_10s, number) ++ 9 min (&gt; L:F111_Leg_10s, number) }
    	(M:Event) 'WheelDown' scmp 0 == if{ (L:F111_Leg_10s, number) -- 0 max (&gt; L:F111_Leg_10s, number) }</Macro>  
    <Area Left="32" Top="32" Width="21" Height="25">
  <Tooltip>Tens</Tooltip> 
  <Click Kind="LeftSingle+RightSingle+WheelUp+WheelDown">@Button1</Click> 
  <Cursor Type="Hand" />
  </Area>
 
 <Macro Name="Button2">(M:Event) 'RightSingle' scmp 0 == if{ (L:F111_Leg_1s, number) -- 0 max (&gt; L:F111_Leg_1s, number) }
    	(M:Event) 'LeftSingle' scmp 0 ==  if{ (L:F111_Leg_1s, number) ++ 9 min (&gt; L:F111_Leg_1s, number) }
    	(M:Event) 'WheelUp' scmp 0 == if{ (L:F111_Leg_1s, number) ++ 9 min (&gt; L:F111_Leg_1s, number) }
    	(M:Event) 'WheelDown' scmp 0 == if{ (L:F111_Leg_1s, number) -- 0 max (&gt; L:F111_Leg_1s, number) }</Macro>  
   <Area Left="53" Top="32" Width="21" Height="25">
  <Tooltip>Units</Tooltip> 
  <Click Kind="LeftSingle+RightSingle+WheelUp+WheelDown">@Button2</Click>
  <Cursor Type="Hand" />
  </Area>
  
   <Macro Name="Button3">(L:SACDAT mode,enum) 4 == (L:ChgWPt, number) (A:GPS FLIGHT PLAN WP COUNT, number) 0 &gt;
if{
    (L:F111_Leg_Sum, number) (&gt; L:ChgWPt, number)
	(L:ChgWPt, number) (&gt; C:fs9gps:directToActivateLeg)
	(L:ChgWPt, number) (&gt; C:fs9gps:FlightPlanWaypointIndex)
	(L:ChgWPt, number) (&gt; C:fs9gps:FlightPlanDirectToWaypoint)
	(L:ChgWPt, number) (&gt; C:fs9gps:FlightPlanActiveWaypoint) }</Macro>
    <Area Left="5" Top="31" Width="23" Height="25">
	<Tooltip>Set SEQ No</Tooltip> 
      <Cursor Type="Hand" /> 
      <Click Kind="LeftSingle"> 12 (>G:Var1) @Button3</Click>
    </Area>	

</Mouse>
 
</Gauge>

The radar then displays centered on the chosen Flight plan Index location.

While this is not what you are after , it does show a methodology to create a type of panning action as follows:
1. Create a Lat/Long mouse pickup by pointing at a area of interest on your current radar map.
2. Feed your pickup Lat/long to your ennum Custom Draw Lat/Long.
3. Your radar will then display centered on your chosen pick up location.

Cheers
Karol
 
Thank You Very Much Karol

Thanks for the direction...

I replaced
Code:
<Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
<Longitude>(A:GPS POSITION LON, Radians)</Longitude>

With
Code:
<Latitude>(A:GPS WP NEXT LAT, Radians)</Latitude>
<Longtitude>(A:GPS WP NEXT LON, Radians)</Longtitude>

and as long as the GPS has a destination it works great!!!

I am going to try a few things more like (A:GPS WP PREV LAT, Radians) in with the code to see if I can by-pass having to enter a destination. Will update with what actually works.

Thanks
Greg
 
3. Your radar will then display centered on your chosen pick up location.
l

Right, that is changing CenterX and Y but is has nothing to do with the <PanVertical>, <PanHorizontal> <PanReset> variables.

Bob
 
I agree , however I believe the panning function has severe limitations.
I really hope that I'm wrong.

Cheers
Karol
 
For the physical pixels, the research i did this seemed to be the norm. thought I would adjust it as necessary when i have it working.

?? No idea what you just said. Anyway, the Pan variables of FSX shift the map the prescribed number of physical screen pixels and PanReset moves the map back to the original position. You didn't post enough of your code to see where the problem is, but if you keep at it, you will find the error.

If you want to change CenterX and Y or Latitude and Longitude, then you can doing something like Karol suggests instead of using the Pan variables.
 
I agree , however I believe the panning function has severe limitations.
I really hope that I'm wrong.

Cheers
Karol

Nooooo, there aren't any limitations at all! I have never had any issue. Just remember that Pan acts on physical pixels but Lat/Lon, and CenterX,Y work with gauge units. So, for a lot of applications, it may really make more sense to change Lat, Lon or Center X,Y than to pan.

Bob
 
Good Morning and thanks to you both, I can already see I need a bigger cup of coffee to digest this....

So with my inexperience with code, sorry I truly am a late bloomer with this stuff, I find myself confused.

So if I have this right, changing the (LAT/LONG> or the <CenterXY> elimantes the need for the Pan Variables all together?

Since last night I have tried various things and all give you a flashing screen until you zoom and land you in the middle of the Alantic.

Things I have tried are removing the Radians out of the equation, changing Radians for degrees even tried, in desperation really...

Code:
<Latitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION LAT, Radians) } els{ 0 (A:GPS POSITION LAT, Radians) }</Latitude>
<Longitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION Lon, Radians) } els{ 0 (A:GPS POSITION Lon, Radians) }</Longitude>

trying to fool it, but this would bring it back to center immediatly. Removing the <Center X/Y> results in the same, thus <LAT/LON> is the same.

So what I dont understand is why the conflict? Karol has experienced the same issue and Bob works as expected. I have been through the code and see no conflict between this display and others. It would be nice to pan and have it reset on the aircraft... but i am at a complete loss as to how or why this isn't working. Researching the basics of what people were using in their gauges mainly GPS Modifications, my orginal coding seemed to be the normal or accepted practice. Or is it conflicting with the GPS?

Bob, as for the your question about the pixel rate, 100 * seems to be the norm and in my guage moves a little less than half the screen. My thought were adjust the 100 * as necessary after the display was working proerly. And thanks for the link Karol, interesting reading. Well I hope this makes sense and going to continue to find the solution.

Thanks
Greg
 
Last edited:
Code:
<Latitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION LAT, Radians) } els{ 0 (A:GPS POSITION LAT, Radians) }</Latitude>
<Longitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION Lon, Radians) } els{ 0 (A:GPS POSITION Lon, Radians) }</Longitude>

But that's not even proper XML syntax.

Panning works fine. Alternatively, switching Lat/Lon like Karol suggests or adjusting CenterX,Y can produce a similar effect if that's the way you want to go. If you are having troubles, then it's your XML code of course. If your debugging skills are good, you'll find it pretty soon I am sure.

Bob
 
Thanks to you both...

Code:
<Latitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION LAT, Radians) } els{ 0 (A:GPS POSITION LAT, Radians) }</Latitude>
<Longitude>(L:TerrainReset,enum) if{ 1 (A:GPS POSITION Lon, Radians) } els{ 0 (A:GPS POSITION Lon, Radians) }</Longitude>

Yes Bob looking at my previous post it is a mess! I was cutting and pasting sections typing in the blanks and not really paying attention, the point was in the end anything other than a single (A:VAR) it doesn't work, anytime I tried to double up Variables is seemed doomed to failure. The (A:GPS WP NEXT LAT, Radians)/(A:GPS WP NEXT LON, Radians) and (A:GPS WP PREV, Radians)/(A:GPS WP PREV LON, Radians) work well but have the obvious problem of centering you with where you are going or where you have been with the added task of entering a flight plan, but better than being in the middle of the Alantic.

I would like to get it to the point of where it will center on the aircraft and then let you pan, but unfortuantly I am down to hours before heading to sea for six weeks, and i have other things I would like to get working in my gauge before I leave amongst other stuff.

In the end, it works I can pan, not to my expectations, and hopefully I come across the bug working on the other stuff.

I don't know how much tinkering I will be doing with my guage, but sure I will have more questions, fortuantly for you guys our Internet Service at sea is sketchy to say the least...

I would like to thank you all, and although may be a bit early, but don't know if I will get back on here after tonight, I wish you all a Happy Holidays and All the best to you and your's in the New Year!

Greg
 
I took another shot at this and using Bob's guide (Which is nothing short of awsome and helped me de-bug several issues) When I left off i was using

Code:
<Latitude>(A:GPS WP NEXT LAT, Radians)</Latitude>
<Longtitude>(A:GPS WP NEXT LON, Radians)</Longtitude>

Which was placing the aircraft over the next Waypoint, Now is placing it somewhere over France :confused:

Anyway as it is not what i truly wanted in the first place and on my agenda to correct i have been playing with it trying to find out why when using

Code:
<Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
<Longitude>(A:GPS POSITION LON, Radians)</Longitude>

it wants to center itself all the time as before.

As Bob had stated in previous post it is not the Panning Functions, The Black Box proved that by when you clicked to move the map, it was showing the (L:Var) working properly and the reset variable was NOT being triggered unless the button was pressed, but yet the map re-centered itself. I have poured over this trying to find the conflict or portion of bad xml and cannot find it at all, truthfully ran out of ideas to look for the error. Has anyone else that has suffered the map centering itself all the time, found the solution or conflict when using the GPS position?

Cheers
Greg


Code:
<!--**************** Main Map Page ****************-->
<Element Name="AvionicsCheck">
  <Visible>(A:CIRCUIT AVIONICS ON,bool)</Visible>
  <Position X="0.00" Y="0.00"/>
  <Element Name="Display">
    <Visible>(L:MFDOffOn,bool)</Visible>
    <Position X="0.00" Y="0.00"/>
    <Element Name="MainMapPage">
      <Visible>(L:MapPage,bool)</Visible>
      <Position X="107.0" Y="58.5"/>
      <Element Name="MainMap">
        <CustomDraw Name="fs9gps:2:map" X="690" Y="600" LayerBorders="Yes" LayerFlightPlan="No" FlightPlanLineWidth="2.0" Bright="Yes">
        <CenterX>345</CenterX>
        <CenterY>300</CenterY> 
        <Zoom>(L:map_ZoomFactor,number) 1852.0 *</Zoom>
        <PanReset>(L:PanReset)</PanReset>
        <PanVertical>(L:PanVert)</PanVertical>
        <PanHorizontal>(L:PanHorz)</PanHorizontal>
        <TrackUp>0</TrackUp>
        <Latitude>(A:GPS POSITION LAT, Radians)</Latitude>
        <Longitude>(A:GPS POSITION LON, Radians)</Longitude>
        <DetailLayerTerrain>3</DetailLayerTerrain>
        <DetailLayerBorders>1</DetailLayerBorders>
        <DetailLayerAirports>3</DetailLayerAirports>
        <DetailLayerVORs>2</DetailLayerVORs>
        <DetailLayerILSs>1</DetailLayerILSs>
        <LayerTerrain>1</LayerTerrain>
        <LayerBorders>1</LayerBorders>
        <LayerAirports>1</LayerAirports>
        <LayerVORs>1</LayerVORs>
        <LayerILSs>1</LayerILSs>
        <LayerNDBs>1</LayerNDBs>
        <ObjectDetailLayerILSs>0x1</ObjectDetailLayerILSs>
        <ObjectDetailLayerVORs>0x1</ObjectDetailLayerVORs>
        <ObjectDetailLayerNDBs>0x1</ObjectDetailLayerNDBs>
        <ObjectDetailLayerBorders>0x1</ObjectDetailLayerBorders>
        <TextDetailLayerAirports>1</TextDetailLayerAirports>
        <TextDetailLayerVORs>2</TextDetailLayerVORs>
        <TextDetailLayerILSs>2</TextDetailLayerILSs>
        <TextDetailLayerNDBs>2</TextDetailLayerNDBs>
        <ColorLayerAirportsTowered>0xF0D0D0</ColorLayerAirportsTowered>
        <ColorLayerAirportsUntowered>0xf5c5d2</ColorLayerAirportsUntowered>
        <ColorLayerVORs>0xffc488</ColorLayerVORs>
        <ColorLayerNDBs>0x8c8cff</ColorLayerNDBs>
        <ColorLayerILSs>0x00ff00</ColorLayerILSs>
        <Elevation0Color>0x5c9862</Elevation0Color>
        <Elevation1000Color>0x4e8443</Elevation1000Color>
        <Elevation2000Color>0x3b7134</Elevation2000Color>
        <Elevation3000Color>0x2f5f2a</Elevation3000Color>
        <Elevation4000Color>0x549d8f</Elevation4000Color>
        <Elevation5000Color>0x56909e</Elevation5000Color>
        <Elevation6000Color>0x568a9e</Elevation6000Color> 
        <Elevation7000Color>0x56819e</Elevation7000Color>
        <Elevation8000Color>0x567c9e</Elevation8000Color>
        <Elevation9000Color>0x566f9e</Elevation9000Color>
        <Elevation10000Color>0x56689e</Elevation10000Color>
        <Elevation11000Color>0x525c9b</Elevation11000Color>
        <Elevation12000Color>0x4d5596</Elevation12000Color>
        <Elevation13000Color>0x485092</Elevation13000Color>
        <Elevation14000Color>0x4D4FA1</Elevation14000Color>
        <Elevation15000Color>0x4A4B9C</Elevation15000Color>
        <Elevation16000Color>0x485093</Elevation16000Color>
        <Elevation17000Color>0x252575</Elevation17000Color>           
        <WaterColor>0x5b0000</WaterColor>
        <IceColor>0xFFEEEE</IceColor>
        </CustomDraw>
      </Element>
    </Element>
  </Element>
</Element>
<Element>
  <Visible>(L:MFDOffOn,bool)</Visible>
  <Element Name="RangeDisplay">
    <Position X="1001." Y="175.0"/>
    <Visible>(L:MapPage,bool)</Visible>
    <FormattedText X="100" Y="37" Length="90" Font="Arial Black" FontSize="32" Adjust="right" VerticalAdjust="Center" Color="Teal" Multiline="No" Bright="Yes">
    <String>%((L:map_ZoomFactor,number) s0 5 &gt;=)%{if}%(l0)%!d! \{dpl=nm}%{else}%(l0 1 &gt;=)%{if}%(l0)%!.1f! \{dpl=nm}%{else}%(l0 6076 *)%!d! \{dpl=ft}%{end}%{end}</String>
    </FormattedText>
  </Element>
</Element>
 
I would like to say that i found the centering problem with using (A:GPS POSITION LAT, Radians) and (A:GPS POSITION LON, Radians) while panning, unfortuantly i cannot for the life of me find the conflict, but have narrowed it down those variables. I did create a work around though, it may not be the right course of action, but it works and also eliminates the jittering problem that was sometimes present.

For now, because this will eat at me until i find the conflict or someone else has a plausible answer as to why it automatically centers, i saved the aircraft postion using (L:variables):

Code:
      (A:GPS POSITION LAT, Radians) (>L:GPS POSITION LAT, Radians)
      (A:GPS POSITION LON, Radians) (>L:GPS POSITION LON, Radians)

Placed it in the mouse section under the map select section, which saves the position allowing you to pan until your content, then again in the pan reset section so when you reset it center's on the aircraft again.

It works, but like i said it is not the solution to the problem, but rather a work around and for now putting this issue to bed, for awhile anyway.Any comments or ideas on this route would be greatly appreaciated.

Thanks Greg
 
Greg,

In short: you can't use <Pan> type commands for a Moving Map, it works only on static coordinates.
Panning is an ansychronius command, meaning the result is going to be displayed on the next cycle of the gauge. To keep this accurate, it is necessary that position coordinates be the same than the previous cycle. As long as you keep your aircraft still and/or while gps coords are kept still, it will work ok but, whenever coordinates between cycles differ, a new <Pan> is issued; and again, in the next cycle as coordinates differ again, another <Pan> cycle is issued, so it never stabilizes to show a proper display.
It's something similar that what would happen if you make a continous Nearest search, you'll never get the list to display because it will be always making calcs in the backgorund.

In replacement of <Pan> just use a variable <CenterX> and/or <CenterY> command(s).

Hope this helps.

Tom
 
Last edited:
Thanks Tom,

That makes sense and puts into light the problem faced with using the aircraft based gps variables. Of course when it updates it is going to update the postion, similiar to the whole laws of motion thing, not really! To say I am relieved that it may not be a conflict in my gauge may be an understatement.

However, as it was discussed before using <CenterX> and/or <CenterY> command(s) to pan a moving map, is this a programmer preference? or is it less taxing on the sim?

I am only asking because saving the postion to an (L:VAR), in my mind, opens up some options as for as the user being able to place the map postion at defined locations (i.e next wp or prev wp or even nearest airport) at a "push of a button" by simply saving whatever input into a (L:VAR).

I know I have been told there are numerous ways to achieve results, my main concern is there is the right way, several wrong ways and ones that will just crash the users sim. Both apparently work but which is the best course of action, from people that have been doing this a lot longer than I have. Thanks again and I am truly seeing the light at the end of the tunnel with this project.

Cheers Greg
 
you can't use <Pan> type commands for a Moving Map, it works only on static coordinates.

Thx Tom, good clarification! MSFT introduced Pan as a feature for ATC radar simulation. Static map, coordinates never change.
 
Back
Top