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

Radar vs Boats

Messages
368
Country
unitedkingdom
Is it possible to get the radar working against ships?
I'm currently playing around with it and it'll display aircraft on the ground, but not other surface vehicles. I've been altering the DetailLayerVehicles value in the ATC radar (but rigged up in an aircraft).
Reading the SDK the ITrafficInfo Filter has the option to filter for ground_vehicles and/or on_ground which would imply it has more flexibility than whatever is being used in the Radar xml code but I'm not sure where to start to incorporate it.
On the other hand I've altered one of the simconnect samples to list all boats within a given radius along with whatever other info I want which could ultimately form the basis of a ship finding radar. So which route do people thing is the best to follow?
 
Right, I've now advanced somewhat. With simconnect I can get a list of all the shipping within anything up to 200KM and even filter out those below a certain size which should make it more realistic.
What I'm after now is a tutorial or info on how to incorporate the simconnect routine into a gauge. Am I looking at writing a C gauge incorporating the simconnect code or can I set it up to work with an XML gauge? Does anyone have any pointers/tips?
 
It sounds like you are on the right track. Unfortunately, the Radar.xml and fs9gps.dll use the Traffic.dll in FSX which seems to have been altered significantly from TrafficInfo.dll that was used in FS9.

While a lot of new functionality was added to it, a great deal was taken away as well...

For example, TrafficInfo.dll allowed one to filter airborne traffic into none, above, below and all which made Arne Bartel's marvelous TCAS module work splendidly.

The new and "improved" Traffic.dll has dumbed that down to off, ground, airborne (all)... :censored:

You would likely be better off writing your routine(s) as a .dll that you can call from either a C or XML "gauge" as needed.
 
You would likely be better off writing your routine(s) as a .dll that you can call from either a C or XML "gauge" as needed.

Bill, I think you're right, getting the data I need using simconnect is quite simple, the main problem is probably going to be incorporating it into an XML gauge so I can use the radar code to incorporate the terrain info etc. I say problem mainly because it's not something I've looked at before rather than it being difficult.
Expect sounds of screaming in the next 12 to 24 hours!
 
If I can implore you - (I'm an FS-9 developer and have created a "real" working radar repeater with "real" radars) - please make sure that your radar takes into account the radar cone of acquisition - which on most aircraft is about a 120 degree arc in front of the aircraft. You should not be able to see "targets" behind you unless you have some sort of a tactical data system that is independent of radar.

The current concept - ie the FSInn "radar" has ALL aircraft seeing in a 360 degree arc which is unrealistic unless you are an AWACS or similarly equipped 360 radar aircraft. And the idea of "limitless" range is also absurd. Most aircraft radars are not all that powerful - so range therefor is limited. One curious aspect I have come across recently is the decision by the modelling community to consider that once you are in range of a radar you are seen - that is we (as a community) have dropped the pD (probability of Detection).

My gauge BTW is written in C/C++. I once wrote a "simple" hoist system in XML and after that experience I wouldn't try using XML on anything near as complex as a "real" radar gauge. Of course I am amazed at what some of the XML programmers do come up with. I cannot think in RPN beyond very simple equations ie 1,1 + = ;)

Good Luck!
 
Last edited:
My gauge BTW is written in C/C++. I once wrote a "simple" hoist system in XML and after that experience I wouldn't try using XML on anything near as complex as a "real" radar gauge. Of course I am amazed at what some of the XML programmers do come up with. I cannot think in RPN beyond very simple equations ie 1,1 + = ;)

Good Luck!

Well Geoff, that's kind of the whole idea of writing the guts of the program in C/C++ and then only using XML script as the display system... :D

The only real limitation to using XML script at this time* is that all vector drawing is limited to what is possible in pure GDI, so "advanced tools" such as hatch brushes and gradient brushes simply aren't possible.

*NOTE: I say "at this time" because it may well be that ESP requirements might drive further development of the XML parsing engine to switch to the GDI+ toolset.

A well defined core in a C/C++ .dll can provide a robust engine for rapid deployment of displays using XML script. One major advantage of which is that one may use FSX itself (or FS9 using a "Reload" gauge) as a real-time part of development. There's a huge advantage in being able to enter a new blob of XML and seeing the results instantly in the sim... :D

Alternatively, one may use XML script simply to develop the prototype layout for a display, then use that as the basis for coding the same display in pure C++/GDI+ for release.

If I can implore you - (I'm an FS-9 developer and have created a "real" working radar repeater with "real" radars) - please make sure that your radar takes into account the radar cone of acquisition - which on most aircraft is about a 120 degree arc in front of the aircraft. You should not be able to see "targets" behind you unless you have some sort of a tactical data system that is independent of radar.

Actually, that can easily be handled through use of either a clip region or a mask. There's no need for any fancy math if your goal is simply to not display targets outside of the cone of acquisition... ;)

Another reason for not limiting one's code to a pre-set "cone of acquisition" in the core engine is that would not allow developing a simulated Mode C transponder based display.
 
Last edited:
I hear you, Bill. Is there a good tutorial on how to meld the two - XML and C gauges. I have a partner that is expert in XML and I in C. But the twain have not been able to meet (yet). I have nothing against XML - in fact I use it extensively in other projects - it's just that **** RPN that kills me. But my partner doesn't seem to have that problem. Or maybe he's more patient, I dunno.
 
I hear you, Bill. Is there a good tutorial on how to meld the two - XML and C gauges. I have a partner that is expert in XML and I in C. But the twain have not been able to meet (yet). I have nothing against XML - in fact I use it extensively in other projects - it's just that **** RPN that kills me. But my partner doesn't seem to have that problem. Or maybe he's more patient, I dunno.

Yes, the "Cabin Comfort" sample code in the FSX SDK was provided for just that reason. Although part of the FSX SDK, it is "backwards compatible" with FS9 simply because it's the same method ACES used to develop the fs9gps.dll module! ;)

Alternatively, you can decipher the arcane and mysterious ICCallback stuff in the FS9 gauges.h file and do it the hard way!

Or, look for Arne Bartel's Traffic Radar gauge and C++/GDI+ source code at http://avsim.com for a detailed look at how he coded the XML<=>C interface for his FS9 version...
 
Last edited:
Roger that. I do have FS-X - just can't use it as it does something horrible to the sound whenever I switch views. Ugh!

I'll check it out - Thanks again.
 
Roger that. I do have FS-X - just can't use it as it does something horrible to the sound whenever I switch views. Ugh!

I'll check it out - Thanks again.

As it happens, I am currently looking through Arne's source code to see if it may be modified for use in FSX... ;)
 
If I can implore you - (I'm an FS-9 developer and have created a "real" working radar repeater with "real" radars) - please make sure that your radar takes into account the radar cone of acquisition - which on most aircraft is about a 120 degree arc in front of the aircraft. You should not be able to see "targets" behind you unless you have some sort of a tactical data system that is independent of radar.

Rest assured as someone who uses a radar in real life the plan is to have a realistic display of the radar return. Ironically in the case of the radar in question the SimConnect limit of 200km for object interrogation is about half the real world value, ship's being better radar reflectors than aircraft.
From my initial experiments I'm fairly sure I can simulate radar gain by only displaying contacts above a certain size, which it should be possible to vary as you increase/decrease the gain. Basic maths should also ensure only shipping within the radar horizon is displayed which will change with altitude.
If I'm feeling really brave I may then see if I can 'lock up' a contact and have it provide a steer through the pilot's attack sight...
 
Back
Top