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

FSXA Terrain Elevation Mapping XML

Messages
131
Country
unitedstates
I am working a new moving map gauge, and want to include a terrain warning overlay. I have the map part done, with custom colors. My question is, using the fs9gps customdraw, can I go into further detail then every 1000ft for elevation level. The reason I need to is to overlay yellow on to of the terrain if it is within 500' of the current aircraft altitude, or red if within 100'. I could easily do this with color scripts in the elevation levels, but only if I want 1000' resolution (ie yellow if between 1000'-2000' below aircraft and red if 1000' or less, not very useful, i don't care if there is terrain 1000' below.)

Any other ways to achieve this?
 
Not as far as I know, using the GPS map system. I do know a friend who has developed a GPWS using a very complex system that throws invisible objects out of the aircraft using SimConnect to get the exact terrain map, but it's incredibly complex and resource-intensive. I don't know if reading in the base terrain data from the bgl files might be an option.
 
Older post here, but does anyone now of a way of implement a "terrain awareness" system, using only default XML?
 
This is what I've done with the standard XML capabilities.
It's somewhat crude (after all, you can only do it in 1,000 ft steps), but due to the fact that FSX interpolated the intermediate colors it's surprisingly effective:

terrain10000ft.jpg


I've done quite a few trips through the Rockies with it, at an altitude WAY lower that the main mountain range, only wiggling my way through the available valleys. Quite fun actually, to find a possible way through those "labyrinths"... ;)

The whole package is available here.
 
Sorry about that...
I had done one last update today, my packing script must've had a bad day.

Anyway — everything should be there now.
 
Very interesting! I had heard you could modify the colors on the FS9GPS, but not for use as dangerous altitude objects. Nice....!


Daniel,

Is it possible that the TCAS software could be tuned also for terrain avoidence? If you can focus on close-by aircraft, can you also set it for terrain through code? Perhaps that might have something in it that could help you to target dangerous terrain zones.
 
Bill, I am already planning a "Terrain Ahead, pull up" feature using similar techniques as the TCAS. Basically, I will determine a point so many seconds in front of the path of travel and compare the elevation there with the current altitude.

I am looking for a way to visualize close proximity terrain. I will take a look at the previously posted example. I have tried something similar with mixed results, but maybe I am missing something.
 
Kronzky

I looked through your code a bit, and you approach is almost identical to something I have tried in a previous gauge. However, it didn't seem to work for me.

When seeking advice on why it wasn't working, I was told that the elevation colors are not "dynamic" and whatever they are set to at load time is the color they will remain.

I haven't actually loaded your gauge and tested it yet, but it seems that isn't an issue for you.

Just to confirm, in your webpage, in your examples you have a screenshot of terrain at 10000ft and 11000ft. Obviously the elevation coloring is different in these screenshot. Are they dynamical changing as you pass through those altitudes?

Thanks for the advice.
 
Unfortunately the colors are not updated automatically.
You have to cycle terrain mode off and on again to get the new ones (I guess for efficiency reasons the whole bitmap is only created once, and then shifted around).

The refresh in my implementation is done automatically, just before you hit an x,000 ft elevation (e.g. at 3,900ft, or 6,900ft, etc.). Since most of the flying is done at even levels I wanted the new color map to be as "fresh" as possible at that point (but I didn't want to do it at *exactly* the x,000 mark, as then it would just constantly toggle on and off, as you're hovering around those altitudes).

There is, of course, a brief blackout while the map is refreshed, but it's not really much of a hindrance when you're actually using it.

If you're going for an exact reproduction of a real gauge, then that, in connection with the large level steps, and the fact that it's not just yellow and red, but many gradients in-between, would make this approach a no-go.
If, on the other hand, you're just trying to convey the same kind of information the real gauge may give you (i.e. which area is safe, and which is dangerous), then this implementation is working surprisingly well.
 
Kronzky,

That's a nice enhancement to the stock gps500 gauge. Good job on your website, too. Its clear a lot of work went into this project.

Bob
 
Unfortunately the colors are not updated automatically.
You have to cycle terrain mode off and on again to get the new ones (I guess for efficiency reasons the whole bitmap is only created once, and then shifted around).

Have you by any chance experimented with this (poorly documented) token for <CustomDraw>?

<UpdateAlways>1</UpdateAlways>

UpdateAlways
Bool
  • Set to True if the map should be updated every frame. Set to False if the map is only to be updated when positions have changed enough.
 
Have you by any chance experimented with this (poorly documented) token for <CustomDraw>?

<UpdateAlways>1</UpdateAlways>
Yeah, I tried that when I was looking for ways to allow panning while the aircraft is moving (or even idling), but I couldn't really observe any difference, whether this was turned on or not (it always seems to update the map every frame).
 
Yeah, I tried that when I was looking for ways to allow panning while the aircraft is moving (or even idling), but I couldn't really observe any difference, whether this was turned on or not (it always seems to update the map every frame).

Actually it's while the a/c is moving that it becomes most noticible, or whenever you have TCAS enabled.

I first noticed when working on a traffic display that the AI wouldn't update on screen whenever I was zoomed in closer than 50nm, which as it turns out was because there wasn't enough "movement" to trigger a map update...
 
The map may not actually be *moved*, but the engine still seems to update it on a constant basis.

Even if the aircraft is just idling, that's enough "movement" for the GPS to constantly re-center the map (whether "UpdateAlways" is on or not).

If you check the "TOTAL WORLD VELOCITY" it'll return something like 0.0001 while the engine is idling (and the brakes are on), and that is enough for the map to be kicked right back, once you try to pan a little, to be centered back onto the plane.

I haven't quite given up on the panning while moving, though — I was hoping to experiment a bit this week with shifting the map center itself (instead of using the panning values). Unfortunately "real life" came up, and I probably won't be able to do anything until next week...
 
Back
Top