March 31, 201313 yr Good Evening Gents, I have come with an interesting query and was wondering if anyone could help. I received my Naval Aviator Wings last week as Coast Guard Aviator #4452 and I am off to Coast Guard Air Station Barbers Point to fly the HC-130H. I have been a lifetime simmer and contribute most of my success to such an early start in Aviation even if it was just on the computer (my parents couldn't afford flight lessons). Currently I am working on building myself a C-130 home trainer and my first task is working on the CDNU(FMS type unit). I am creating an HTML5 user interface (so I can use my ipad) and a C# Backbone to interact with the interface and the sim. My current question is how I take a variable from the C# program and use it in an XML gauge. For instance, I am calculating my own Lateral Deviation for the RNAV routes created in the CDNU and I am curious how I can take that variable and use it in an XML gauge file. If this is not possible I will write all the gauges outside of the sim, but I was curious if I could do it. So far I've loaded in the airac nav database and can build flight plans so if anybody is interested in the program I would be more than willing to send them a copy. Thanks! -LTJG Matthew Chase Coast Guard Aviator #4452
April 1, 201313 yr Congrats! Well, if your program gives lat and long values, then you can put those in an xml gauge. Advice: download the gps guide of "Propwash". It is all in there. Jan "Beatus ille qui procul negotiis..."
April 1, 201313 yr Author Thanks your response! I'm actually not using any of the FMS GPS variables I'm using the Nav Database and computing everything myself so I guess my question was on a simpler level, if I compute my own variable to shift the CDI, how do I get the XML Gauge file to recognize the value in the C# Application.
April 1, 201313 yr Ah, That one is for Fr. Bill or another C++ guru to answer. But i think it is possible. Jan "Beatus ille qui procul negotiis..."
April 1, 201313 yr Moderator Thanks your response! I'm actually not using any of the FMS GPS variables I'm using the Nav Database and computing everything myself so I guess my question was on a simpler level, if I compute my own variable to shift the CDI, how do I get the XML Gauge file to recognize the value in the C# Application. First of all, CONGRATLATIONS! That is quite a milestone achievement. It's simply a matter of registering the XML variable's name in your C# application, then using the commands from the gauges.h file to write your local C# variable to the XML variable. I wrote a Wiki article several years ago in the FS Developer Wiki: http://fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges Although it's specifically coded for C/C++, I think the explanation is clear enough to translate to C#. Be aware though that this code must be run "in process" within FS's own program space. IOW, if your application is stand alone, you may be faced with using SimConnect instead. IOW, you'd need a client module in your application, and a host module that would be run in FSX's program space. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment