Pogo Posted September 14, 2009 Posted September 14, 2009 (edited) Hi, I am very new to this facet of simming and while I have been combing the other threads for info, I didn't want to hijack any of them in order to address some very basic questions from a novice. I've bought, and am reading, both of Mike Powell's excellent books on building flight sim instruments and recreational flight simulators, and I am scouring the Web for info. I am trying to understand the components and data flow used for interfacing DCS: Black Shark to a physical cockpit and its switches and instrumentation. I put together a high level architecture graphic to help me get it straight in my mind and I just want to make sure that I am on the right track. I understand that the Simulation Computer and the Cockpit Control Computer can be one and the same, but I do have a couple questions. 1. Does export.lua serve for both output from and input to Black Shark, or is there a separate lua script for importing data into BS? 2. Am I forgetting any obvious components or steps in the communications chain? My next step after this is to write a simple application that talks to BS and can display info (for example, airspeed) from BS, and send data from a switch simulated in the application (for example, DT/DH), to BS. Any and all input, thoughts, and ideas are more than welcome! Cheers, Pogo Edited September 15, 2009 by Pogo Fixed Image Link Intel I7 920 Std Clock - 6GB DDR3 RAM - 2 x GTX260 SLI - 10K 130GB Velociraptor Drive - Vista 64Bit - Saitek X52 Pro Hotas - Saitek Pro Rudder Pedals - TrackIR 5
JAG Posted September 14, 2009 Posted September 14, 2009 (edited) Hi pogo, I'm not an expert, still learning, but I think I can help you with this one. In the export.lua script, there is a function that allows you to send info to the sim, and is this: function LuaExportBeforeNextFrame() -- Works just before every simulation frame. -- Call Lo*() functions to set data to Lock On here -- For example: -- LoSetCommand(3, 0.25) -- rudder 0.25 right -- LoSetCommand(64) -- increase thrust end This function listen for any input that need to be applied before the simulation continue, it use for example move the rudder a little bit to the right or increase thrust. I imagine you could send it, through keyboard, joystick or a homemade device. Good luck with your project Un saludo Edited September 14, 2009 by JAG Quick guide to configure ABRIS and LCD mini monitor Quick Countermeasure Editor v1.3.0 Core i5 3570K 4.0Ghz | GIGABYTE MOTHERBOARD | Crucial M4 120GB | 8GB DDR3 1600 MHZ | ASUS GTX 670 | AOC LED 23" | AOC LCD 24" | HYBRID DUAL THROTTLE (SAITEK THROTTLE QUADRANT + SUNCOM DUAL THROTTLE) | CH FIGHTERSTICK | SAITEK PRO PEDALS |
Pogo Posted September 14, 2009 Author Posted September 14, 2009 Thank you Jag, That does indeed answer my second question. Next, I just have to decide between Visual Basic and C# for my application development. Cheers, Pogo Intel I7 920 Std Clock - 6GB DDR3 RAM - 2 x GTX260 SLI - 10K 130GB Velociraptor Drive - Vista 64Bit - Saitek X52 Pro Hotas - Saitek Pro Rudder Pedals - TrackIR 5
Pogo Posted September 15, 2009 Author Posted September 15, 2009 Fixed the image link. Sorry about that Pogo Intel I7 920 Std Clock - 6GB DDR3 RAM - 2 x GTX260 SLI - 10K 130GB Velociraptor Drive - Vista 64Bit - Saitek X52 Pro Hotas - Saitek Pro Rudder Pedals - TrackIR 5
JG14_Smil Posted September 17, 2009 Posted September 17, 2009 good diagram Pogo. It helps me to visualize what is needed. Thanks.
Pogo Posted September 17, 2009 Author Posted September 17, 2009 good diagram Pogo. It helps me to visualize what is needed. Thanks. Hi JG14, Assuming I am not missing anything ..... you're welcome. :) Now I just have to put it into practice. Cheers, Pogo Intel I7 920 Std Clock - 6GB DDR3 RAM - 2 x GTX260 SLI - 10K 130GB Velociraptor Drive - Vista 64Bit - Saitek X52 Pro Hotas - Saitek Pro Rudder Pedals - TrackIR 5
sweinhart3 Posted September 18, 2009 Posted September 18, 2009 I dont really understand any of the LUA stuff. my experience is around C++ which is close to C#. Im not sure about sending info to the sim but what I had in mind was to use the export file for all outgoing data while using keyboard and joystick emulators for all buttons and switches. That way all inputs could be assigned directly in the controls input page in the sim. This might make the programming simpler since u would only be programming for the outputs Intel i7 990X, 6GB DDR3, Nvidia GTX 470 x2 SLI, Win 7 x64 http://picasaweb.google.com/sweinhart
Pogo Posted September 19, 2009 Author Posted September 19, 2009 I dont really understand any of the LUA stuff. my experience is around C++ which is close to C#. Im not sure about sending info to the sim but what I had in mind was to use the export file for all outgoing data while using keyboard and joystick emulators for all buttons and switches. That way all inputs could be assigned directly in the controls input page in the sim. This might make the programming simpler since u would only be programming for the outputs Yeah, i've been thinking about that. The challenge that I see with just sending keyboard commands is that it is possible for the switches in cockpit to be out of synch with the sim. Whereas if you use the LoSetCommand(x,y) commands you can have the Cockpit Control Application make sure that the switch settings in the sim are synched to the physical switches. I'm still pondering that, though. Cheers, Pogo Intel I7 920 Std Clock - 6GB DDR3 RAM - 2 x GTX260 SLI - 10K 130GB Velociraptor Drive - Vista 64Bit - Saitek X52 Pro Hotas - Saitek Pro Rudder Pedals - TrackIR 5
Recommended Posts