• 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

Hi Alexey

Sorry was unable to download from PM .

Attached please find attached ND radar_kmV4.zip , this version has display distances scaled as was originally required .
See shot below .

Cheers
Karol
Scaled ND Range rings.jpg
 

Attachments

Hi, Karol!

Sorry was unable to download from PM .

I think it's due to runet sanctions;-))). Anyway. I did it! Made the desired scale on the map. Only thanks to your tips!
Many many thank you again!:wizard:
It is also possible soon I will need your help again. I will try to display the VOR/DME on the map with custom icon.;)

Examples:
Here is a 80km scale factor. Distance to waypoint also 80km.
2018-11-22_17-28-59-399.jpg2018-11-22_17-29-12-490.jpg2018-11-22_17-29-37-394.jpg

And here is a zoom 160, to wpt - 160km
2018-11-22_17-40-47-641.jpg2018-11-22_17-40-56-745.jpg
 
Oh, i forgot add a code!

I'm just changed several lines.
First:
Code:
 <Update Hidden="Yes">
               (L:map NDzoom,number) 14 == if{
                14 (&gt;L:map NDzoom,number)
                4 (&gt;L:NDZoomfactor,number)
                }
 </Update>
I wanted the default zoom to be 10. But when switching on, need have to turn the zoom from beginning to end several times to make the map look normal.

Then change nonlinearity to:
Code:
<Item Value="-28" Y=  "110"/>
<Item Value=   "0" Y="260"/>
<Item Value= "28" Y="410"/>

<Item Value="-28" X=   "0"/>
<Item Value=   "0" X="150"/>
<Item Value= "28" X="300"/>

And zoom switch:
Code:
            <Click>(L:map NDzoom,number) (L:map NDzoom,number) 2 / - 14 max (>L:map NDzoom,number)
            (L:NDZoomfactor,number) 2 * + 4 min (>L:NDZoomfactor,number)</Click>
            
                        <Click>(L:map NDzoom,number) 2 * + 1792 min (>L:map NDzoom,number)
            (L:NDZoomfactor,number) (L:NDZoomfactor,number) 2 / - 0.03125 max (>L:NDZoomfactor,number)</Click>


Everything works perfectly. The only one but, with a map scale of 1280km, the waypoints shift, as does the flightplan line. I think this is due to the default GPS module and is not fixed.
640 - is good
2018-11-22_18-32-38-888.jpg


1280 - is not
2018-11-22_18-32-36-824.jpg
 
Everything works perfectly. The only one but, with a map scale of 1280km, the waypoints shift, as does the flightplan line. I think this is due to the default GPS module and is not fixed.
640 - is good, 1280 - is not
Alexey and Karol,

The 640 setting equates to a zoom of 320,000 meters according to your expression <Zoom>(L:map NDzoom,number) 1000 * 2 / </Zoom>. As you note, you're ok so far. However, the 1280 setting equates to a zoom of 640,000 meters. Your issue is that the map projection changes at 500,000 meter zoom and this change has not been accounted for in the code.

Starting with FSX, the fs9gps:Map is a hybrid of Equal Area Sinusoidal and Equidistant Cylindrical projections that is a function of Zoom. At ranges below 500,000 meters, FSX uses a Sinusoidal Projection like FS9. However, at Zoom >= 500,000 meters, it switches to an Equidistant Cylindrical projection. A consequence of this switch is that the X-axis scale must be multiplied by the cosine of the latitude to yield correct east-west distances.

Distance distortion in this projection scheme becomes so severe at high latitudes that FSX reverts back to sinusoidal projection at latitudes greater than 70° North and South. On Equidistant Cylindrical Projections, Range Rings are actually ellipses (except at the equator) because of the different X and Y axis scales. On Sinusoidal Projections, they are circles. Consequently, Range Rings (<LayerRangeRings>) should never be displayed in FSX (thru P3D) at Zoom Factors of 500,000 meters and above.

Bob
 
Hi Bob!
Thank you! That is what I meant. Need to change a code for zoom more than 500000m (1280km in our map)?


First off, I looked over your code for only a minute and didn't test this, but try the following and see if it solves the 1280 setting (500,000 meter zoom) issue.

Multiply all of your X shifts by the cosine of the aircraft latitude (ideally, the middle latitude displayed on the map, but aircraft latitude should be good enough). For example:
XML:
<Value>(L:Bearing0,radians) (A:PLANE HEADING DEGREES TRUE,radians) - sin (L:Distance0,kilometers) * @500KAdjustment *</Value>


and include this macro right below the "g" macro:
XML:
<Macro Name="500KAdjustment">
    (A:PLANE LATITUDE, degrees) 70 &gt;=
        if{ 1 }
        els{ (L:map NDzoom,number) 1000 &gt;=
            if{ (A:PLANE LATITUDE, radians) cos }
            els{ 1 }
        }
</Macro>


Also, note the warning about use of LayerRangeRings displayed on an Equidistant Cylindrical Projection.

Hope this helps,

Bob
 
Last edited:
Alexey and Karol,

The 640 setting equates to a zoom of 320,000 meters according to your expression <Zoom>(L:map NDzoom,number) 1000 * 2 / </Zoom>. As you note, you're ok so far. However, the 1280 setting equates to a zoom of 640,000 meters.

Bob

Hi Bob

I know the Custom Draw code looks strange , but the halving is negated in the Zoom IN/OUT switch code .
(The switch code multiplies or divides by 2 to create the zoom step series .)
So ,
640 setting actually = 640,000 meters .
1280 setting actually = 1280,000 meters .
the 640 km and 1280 km distances can be confirmed by the Distance to an active Wpt readout ,
so the distance scale in the display is accurate .

Both the Custom Draw Zoom code , and the ZI/ZO switch code is a direct copy of Jan's code from a link you provided
earlier in this thread topic .

Cheers
Karol
 
so the distance scale in the display is accurate .

Hi Karol, I think Bob is right. We only halved the map. Just map view. At the same time, all distances look correct. Look for example at the display of airports. In the default map, their icons (view of the runway) were twice as large. Later, from home, I will show what I mean.
 
Hi Alexey

Congratulations , what you have achieved is absolutely stunning , well done .
Earlier in this thread (at about reply # 5) , Bob correctly detailed that this project is difficult and complex ,
but at the end of the day you have managed to create a nice instrument .

I will leave the discussion of large distance map projection problems to Bob , he is the expert on that topic .

Looking carefully at the second shot at reply # 44 above ( 1280 km ) , I suspect that some of the Circle displacement from ideal
is due to Fine tuning of X and Y values in the Wpts sections .
and some due to the large distance projection issues that Bob mentioned .

Setting those X and Y values is a difficult and demanding task , in my radar I did it by an endless series of
trial and error attempts , in the end I decided that what I had was ... good enough .
( by the way , I did notice that you used " 28 " in the Nonlinearity .... very impressive )
In a practical flying sense you want the circle precision at the lower zoom levels , they are the ones that you
more commonly use , the large distance zooms are to provide a big picture of the overall situation ,
so in my view the circle accuracy is not so essential , of coarse it would be nice to be accurate at all levels .

Once again , well done .

Cheers
Karol
 
Once again , well done

Thank you so much! That would not be without your help. Thanks for the tip and the good instructions!!!
I think that the scale of 1280km I will not use often. Therefore, it is possible for now to leave it as it is. Now I am interested in how to add custom images VOR, NDB and airports. I will try various options and I will definitely share the work process on this issue.
 
Hi Karol, I think Bob is right. We only halved the map. Just map view. At the same time, all distances look correct. Look for example at the display of airports. In the default map, their icons (view of the runway) were twice as large. Later, from home, I will show what I mean.

Guys,

Just making a simple point that at the largest zoom step, L:NDZoomfactor=0.03125, L:map NDzoom=1280, and the <Zoom> expression <Zoom>(L:map NDzoom,number) 1000 * 2 / </Zoom> equates to 640000.

1542984655892.png


The map projection changes at <Zoom> greater than 500000 so when an xml overlay is used with <Zoom> that large, the X scale should be adjusted. You can see what I'm talking about by looking at the maps below. The red line is the same X length in each map. These are at about 40° north latitude.

1542987328000.png


Try the suggestion in #47 and see if it helps with the last zoom out step. By the way, the map projection change occurs at <Zoom> greater than 500000, not &gt;=, so please delete the trailing "=" in the macro to make it simply &gt; . Probably goes for the 70° one too. I need to edit the guidebook.

Anyway, great job on this. Karol's work is always imaginative and very nice to look at.

Bob
 
Last edited:
Hi Bob

The shot below is from a discussion on that aspect earlier this year .
In the Radar you can see dramatically the change in aspect ratio of a ' U ' shaped valley as the zoom is changed
from 300 to 400 , just as shown in your above shot .
Also note change in aspect ratio shape of green lowlands on left of radar .
England is a great place to get the visuals of shape change as the whole of the country fits on screen during
the increasing zooms .

Cheers
Karol
300 nm click limit.JPG
 
In the Radar you can see dramatically the change in aspect ratio of a ' U ' shaped valley as the zoom is changed
from 300 to 400 , just as shown in your above shot .

Karol,

What I cannot tell from your screenshot above is precisely what number is in the <Zoom></Zoom> tags. The <Zoom> number causes the projection change at >500,000. Beware of units conversions.

I understand where you're coming from when you say, "I suspect that some of the Circle displacement from ideal is due to Fine tuning of X and Y values in the Wpts sections and some due to the large distance projection issues that Bob mentioned ."

I also just realized that a macro name shouldn't start with a number, so it should have been named Adjustment500K, but even then, it may not solve the high zoom issue alone.

Bob
 
Oh, i forgot add a code!

I'm just changed several lines.
First:
Code:
<Update Hidden="Yes">
               (L:map NDzoom,number) 14 == if{
                14 (&gt;L:map NDzoom,number)
                4 (&gt;L:NDZoomfactor,number)
                }
</Update>
I wanted the default zoom to be 10. But when switching on, need have to turn the zoom from beginning to end several times to make the map look normal.
Hi Alexey

If you are still using the above code , and still need to cycle the zooms several times , then possibly changing the first 14 to 0
as follows might help ,
Code:
<Update Hidden="Yes">
               (L:map NDzoom,number) 0 == if{
                14 (&gt;L:map NDzoom,number)
                4 (&gt;L:NDZoomfactor,number)
                }
</Update>

Cheers
Karol
 
If you are still using the above code , and still need to cycle the zooms several times , then possibly changing the first 14 to 0
as follows might help ,

Thanks Karol! I change it. And (forgot about this) add it to zoom swithing gauge. Now it works fine. It remains to add the code in 3D cockpit to the switching.

About reduced zoom: I checked the old version of the map and the new one - they are almost identical. So leave as is.

Bob, i will check your code later.
 
Guys, i tried to add showing nearest VOR on map. But this code is not working:
Code:
<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="dodgerblue" VerticalAdjust="Center">
<String>\{bo}
%((@c:NearestVorCurrentIdent))%!s!\n
%((A:PLANE LATITUDE,degrees) (>@c:GeoCalcLatitude1,degrees) (A:PLANE LONGITUDE,degrees) (>@c:GeoCalcLongitude1,degrees) (@c:NearestVorCurrentLatitude,degrees) (>@c:GeoCalcLatitude2,degrees) (@c:NearestVorCurrentLongitude,degrees) (>@c:GeoCalcLongitude2,degrees)
(@c:GeoCalcBearing,degrees) (>L:Bearing15,degrees) (@c:GeoCalcDistance,kilometerss) (L:NDZoomfactor,number) * (>L:Distance15,kilometers))
</String>
<Axis X="-5" Y="8"/>
</FormattedText>
<Element>
<PolyLine Color="dodgerblue" LineWidth="1" Bright="Yes"><Point X= "0" Y="-3"/><Point X= "3" Y= "3"/><Point X= "-3" Y="3"/></PolyLine>
<Clip Left="0" Right="299" Top ="48" Bottom="280"/>
</Element>
<Shift>
<Value>(L:Bearing15,radians) (A:PLANE HEADING DEGREES TRUE,radians) - cos (L:Distance15,kilometers) * -1 * </Value>
<Nonlinearity>
<Item Value="-28" Y=  "110"/>
<Item Value=   "0" Y="260"/>
<Item Value= "28" Y="410"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>(L:Bearing15,radians) (A:PLANE HEADING DEGREES TRUE,radians) - sin (L:Distance15,kilometers) * </Value>
<Nonlinearity>
<Item Value="-28" X=   "0"/>
<Item Value=   "0" X="150"/>
<Item Value= "28" X="300"/>
</Nonlinearity>
</Shift>
<Clip Left="0" Right="299" Top ="48" Bottom="280"/>
</Element>

Can you help me with this?
 
Hi Alexey

I have never done this .
I have NOT tested the following .
Give the following a try to see if it works ,

# 1 .
Update .
Insert the following into the Update section ,
Code:
        (L:NearVORsearch,enum) 0 ==
            if{
                (A:GPS POSITION LAT, degrees) (>@c:NearestVorCurrentLatitude, degrees)
                (A:GPS POSITION LON, degrees) (>@c:NearestVorCurrentLongitude, degrees)
                2 (>@c:NearestVorMaximumItems)
                40 (>@c:NearestVorMaximumDistance, kilometers)   
            }
this conducts a search for VOR up to 40 km from your aircraft .

# 2 .
I have modified your code as follows ,
Code:
<Element>
<FormattedText X="35" Y="10" Bright="Yes" FontSize="9" Font="Tu2X4_VSS" LineSpacing="8"  Adjust="left" Color="dodgerblue" VerticalAdjust="Center">
<String>\{bo}
%(0 (&gt;@c:NearestVorCurrentLine))
%((@c:NearestVorCurrentICAO) (&gt;@c:NearestVorCurrentIdent) )
%((@c:NearestVorCurrentIdent))%!s!\n
%((A:PLANE LATITUDE,degrees) (>@c:GeoCalcLatitude1,degrees) (A:PLANE LONGITUDE,degrees) (>@c:GeoCalcLongitude1,degrees) (@c:NearestVorCurrentLatitude,degrees) (>@c:GeoCalcLatitude2,degrees) (@c:NearestVorCurrentLongitude,degrees) (>@c:GeoCalcLongitude2,degrees)
(@c:GeoCalcBearing,degrees) (>L:Bearing15,degrees) (@c:GeoCalcDistance,kilometerss) (L:NDZoomfactor,number) * (>L:Distance15,kilometers))
</String>
<Axis X="-5" Y="8"/>
</FormattedText>
<Element>
<PolyLine Color="dodgerblue" LineWidth="1" Bright="Yes"><Point X= "0" Y="-3"/><Point X= "3" Y= "3"/><Point X= "-3" Y="3"/></PolyLine>
<Clip Left="0" Right="299" Top ="48" Bottom="280"/>
</Element>
<Shift>
<Value>(L:Bearing15,radians) (A:PLANE HEADING DEGREES TRUE,radians) - cos (L:Distance15,kilometers) * -1 * </Value>
<Nonlinearity>
<Item Value="-28" Y=  "110"/>
<Item Value=   "0" Y="260"/>
<Item Value= "28" Y="410"/>
</Nonlinearity>
</Shift>
<Shift>
<Value>(L:Bearing15,radians) (A:PLANE HEADING DEGREES TRUE,radians) - sin (L:Distance15,kilometers) * </Value>
<Nonlinearity>
<Item Value="-28" X=   "0"/>
<Item Value=   "0" X="150"/>
<Item Value= "28" X="300"/>
</Nonlinearity>
</Shift>
<Clip Left="0" Right="299" Top ="48" Bottom="280"/>
</Element>

Test fly it and see if it works .

Cheers
Karol
 
Hi Karol!

Test fly it and see if it works .

No, unfortunately is not working:-( I continue to experiment.

I'm just want to add custom VOR (DME, NDB) symbols. If VOR (DME, NDB) is tuned - is green, if not - blue.
If VOR (DME, NDB) is flightplan waypoint - show it if flightplan is active. Also show airport symbols if wpt is departure or arrival airports.
Like on example picture.
post-41-1112449203.jpg
 
Hi Karol!

I'm just want to add custom VOR (DME, NDB) symbols. If VOR (DME, NDB) is tuned - is green, if not - blue.
If VOR (DME, NDB) is flightplan waypoint - show it if flightplan is active. Also show airport symbols if wpt is departure or arrival airports.
Like on example picture.
/QUOTE]

Hi Alexey

That description is totally different , it's not the normal Nearest VOR search .
What you are after is very complex .
Also Departure and Arrival airports do not have a Variable , it requires an algorithm to check for First Index and
the Last Index .
Sorry , but I cannot help you on this task .

Perhaps Bob can help .

Cheers
Karol
 
Back
Top