Jump to content
Sign in to follow this  
Guest bookmark

itrafficinfo examples needed

Recommended Posts

Guest bookmark

Yup, AA is IMHO badly implemented and a major nuisance in the FS graphics engine. I will carry on experimenting and report my results.Thanks /Thomas

Share this post


Link to post
Share on other sites
Guest bartels

OK, a new switch AntiAlias="0"/"1" for the CustomDraw statement.

Share this post


Link to post
Share on other sites
Guest bookmark

Works perfectly, thanks! One question: I want to control TCAS color with the macro I use for the other CRT elements (see screenshot). Like this:%('0x5fffaa' '0x7ac688' '0x7ab678' 3 (L:SColor,enum) case)...StandardColour="@TCASColors" ... It does not work though. Why?

Share this post


Link to post
Share on other sites
Guest bartels

The problem is twofold, first the ustomdraw doesn't seem to do any calculation in the attributes unlike other elements, and secondly all ...Colours in my Customdraw only accept integers (too lazy to treat them as string and then converting to integer).So what happens: a macro is nothing else then a textual replacement, it doesn't calculate anything, so with StandardColour="@TCASColors" you copy te Macro body to the CustomDraw attribute "StandardColour" which can't interpret it. Solution? Use "StandardColour" as element, like @TCASColorsCore(A:GPS GROUND TRUE HEADING, degrees)but then you can't use the original macro, because it uses syntax ("%(...)"), but you need syntax for elements of CostumDraw. So with redefined macros it should work:'0x5fffaa''0x7ac688' '0x7ab678' 3 (L:SColor,enum) case%(@TCASColorsCore)

Share this post


Link to post
Share on other sites
Guest bookmark

Works perfectly, thanks!The radar I am trying to build with your help has two modes btw, VERT/HOR. HORizontal mode is like the present solution, i.e. the CRT y axis shows distance to the echoes. In VERTical mode they are instead shown with vertical separation, i.e. the y axis shows relative altitude (above/below the horizon). Shouldn't be too difficult to implement I think.(?)The aircraft in question is the SAAB J35J Draken, which is a freeware release. 100% XML except for two gauges by Doug Dawson that he graciously permitted me to include in the distribution. I would be very happy if you permit me to also include your dll in the package (with proper credits of course). Thanks and best regards /Thomas

Share this post


Link to post
Share on other sites
Guest bartels

My coding is a bit different to your purposes. I draw each aircraft "dot" (a ring with a short line) relatively to the aicraft due north and then rotate the screen by the heading (OK I rotate the coordinate system BEFORE I draw actually), and you need for a typical fighter radar something with with a forward looking radar, not all round. You can eather use a different coordinate axis, not in the center, or calculate the relative view angles and don't rotate the screen. For the vertical mode you'll need that anyway.

Share this post


Link to post
Share on other sites
Guest bookmark

Yes, I see what you mean. I analyzed your code and found the relevant parts, I think I have the hang of it now. I will make the changes I need and recompile it, see what happens. Very educating for me if nothing else. Will post the results here. Cheers /Thomas

Share this post


Link to post
Share on other sites

Hi,I had very severe program startup problems using the trafficradarxml.dllIn what folder do you have to put it, root or modules?Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest bookmark

The Modules folder!

Share this post


Link to post
Share on other sites

ThanksJan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest bartels

Hm, did I forget to say that I compiled with VC6.0 and linked "gdiplus.lib" and "user32.lib"? Just before questions come up.

Share this post


Link to post
Share on other sites

Documentation, and the lack thereof, is the reason while all of this SDK-type stuff is such a black art and nightmare to wade through.Of course we have the helpful folk on here who shine beams of light into the darkness. However, the sacrifice of good documentation, which is almost as much work as the original technology artifact itself, creates as many problems as it avoids.Now, can I fault a volunteer, such as Arne, who is has done more than his share to help his fellow developers along? No way. Can I fault Microsoft for not making some of this clearer and easier to deal with? Probably not. However, the song remains the same such that add-on development in the FS series is arcane and obfuscated with kluges which are not accompanied by good explanation.What we need is a clone who can do your documenting while you progress with the hard stuff. Pair programming maybe?:-)


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites
Guest bookmark

Just commenting the tricky parts of the code usually helps a lot. In this particular case, though, I found Arne's code quite easy to understand. I managed to make my changes and recompile the gauge in minutes, no problem. And I am a real amateur in this area, just blundering about most of the time!Cooperating on a project in the way you suggest is usually a good idea. But to write good documentation for source code you need to be very much "inside" the process, not so easy considering that most of us are hobbyists, dispersed around the globe. I know it can be done though, I spent 10 years doing exactly that as a technical documentation consultant. But I sometimes wondered why the software guys I interviewed for hours and hours didn't just use that time to write the documentation themselves. But then I would be unemployed of course. ;o) Just my ten cents, and slightly off-topic as usual./Thomas

Share this post


Link to post
Share on other sites

Hello Arne,As I just come back from vacations, I'm trying to download the file you have so kindly shared, but they are not available any more. Can you please share them again?Thanks !!Eric

Share this post


Link to post
Share on other sites

>Hello Arne,>>As I just come back from vacations, I'm trying to download the>file you have so kindly shared, but they are not available any>more. Can you please share them again?I sent them to you via email, Eric. Enjoy!


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...