1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Telemetry from DCS

Discussion in 'Digital Combat Simulators (DCS)' started by Hypo, Jun 7, 2014.

  1. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    Value1,

    First thank you so much for responding, it give me hope. Force Dynamic will not provide me any help because of two reasons. First is, I didn't purchase the platform from them, I won it on a Dovebid.com auction. Second reason is that they don't really do the software to support flight simulation, they are more into the racing sim games. I paid for the necessary software to be modified for MSFX but they are not willing to mess with it anymore for other sim games so I'm on my own.

    I've already paid for the Simtools and DCS Plugin and installed it on my gaming computer. I will only use one computer. I've attached two files. One is a screen shot of the control software and the ReadFS program which receives the data from the MSFX game on a set Port. I've also attach the MSFS.ini this has the preset data which is used by the Force Dynamics software to support the MSFX.

    Could you please take a look at both files and tell me if this is similar to the information I need. If the READFS program listens for data on a certain IP and port number is there any way to have Export.lua send the position data to the port.

    Concerning the Simtools and DCS plugin, with in the Game Engine Axis assignment there is a preset for Force Dynamics 301. When I choose the preset, it shows values for 3 axis but they are all Surge, Heave, and Sway. There is no Pitch or Roll assignment. Do you think this is correct? How do I get in touch with the Simtools people to determine were the present originated from.

    Thanks in advance for any help.

    Fraza44

    Attached Files:

  2. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    BlazinH,

    Value1 has tried to help me with my FD301 platform. I'm trying to get DCS World vers 1.2.9 to talk to my Force Dynamics control software. With Value1 help, I think we've narrowed it down to just inputting the UDP port number and the IP address of my game computer in the export.lua file but I'm a total newb when it come to Lua programming. I have a few questions if you don't mind help me out.

    1. On the very first export.lue file you listed above, do I just copy all and replace everything in my existing export.lua file.

    2. When you say remove the "--" to uncomment do you mean all them within the file or just the one after the "2) Socket" to statement?

    3. Concerning the files located in th "LuaSocket" folder, do I need to do anything to them and do they need to be moved to a specific directory once they have been reconfigured?

    4. Do I need to do anything within the game options to make this all work?

    I really open you can help me out because I would love to get my FD301 working with DCS World A10C.

    Thank you

    Fraza44
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,160
    Location:
    Oklahoma City, USA
    Balance:
    15,973Coins
    Ratings:
    +1,821 / 32 / -1
    Hi @Fraza44 , Copy this code. Open your export.lua file with notepad. Use the copied code to replace only the same parts of the code that’s in your export.lua file. Change the host and port to what you need. Save it. This should now output pitch, roll, and yaw data. I’m not sure if this has changed but you may need to open the config.lua file also and make sure EnableExportScript = True.

    • Like Like x 1
  4. value1

    value1 Nerd Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,178
    Location:
    Zug, Switzerland
    Balance:
    9,237Coins
    Ratings:
    +3,226 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    As you can see from the LFS plugin source, the data output of LFS has this structure:

    Private Structure OutSim
    ' time in milliseconds
    Public uintTime As UInteger
    ' Angular Velocity
    Public sngAVelocity0 As Single
    Public sngAVelocity1 As Single
    Public sngAVelocity2 As Single
    ' Orientation
    Public sngOrientation0 As Single
    Public sngOrientation1 As Single
    Public sngOrientation2 As Single
    ' Acceleration
    Public sngAcceleration0 As Single
    Public sngAcceleration1 As Single
    Public sngAcceleration2 As Single
    ' Velocity
    Public sngVelocity0 As Single
    Public sngVelocity1 As Single
    Public sngVelocity2 As Single
    ' Position
    Public PosX As Single
    Public PosY As Single
    Public PosZ As Single
    ' Game ID - if specified in cfg.txt
    Public lngGameID As Long
    End Structure


    Please make sure, the same data is output from the export.lua.
  5. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    All,

    I was able to get LFS to work with my platform after making changes to the cfg.txt file. I made the below changes:

    "This can be controlled by 5 lines in the cfg.txt file :

    // OutSim Mode 2 :0-off 1-driving 2-driving+replay
    // OutSim Delay 1 :minimum delay between packets (100ths of a sec)
    // OutSim IP 192.168.0.105 :IP address to send the UDP packet
    // OutSim Port 25010 :IP port
    // OutSim ID 1 :if not zero, adds an identifier to the packet
    "

    LFS was able to talk directly to the FD301 Force Control program and I was able to try different "Presets" within the Force Control software which allow more aggressive movements of the platform.

    My installation of DCS would not open for some reason so I'm blowing it out and doing a reinstall so I can try the export.lua setting BlazinH sent.

    Do I need to do anything in the socketlua folder because I notice there is a tcplua script but no udplua script. Also do I need to move the socketlua script to any specific location or just leave them all where they are at.

    Fraza44
  6. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    BlazinH,

    I copied the code into the Export.lua file but still could not get any data flowing to the FD301 force control software. Is the script configured to send the data to the UDP port or by me inputting the port number the data should go to that port.

    I even played around with changes to the coding you sent but could not get anything flow. Any suggestion?

    Fraza44
  7. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,160
    Location:
    Oklahoma City, USA
    Balance:
    15,973Coins
    Ratings:
    +1,821 / 32 / -1
    The code from DCS for lua uses TCP. Here is a link to documentation on how to implement UDP instead. http://w3.impa.br/~diego/software/luasocket/udp.html#udp

    The values sent may not work as is without them being scaled to the value range your control software expects. And values can be in Radians or Degrees too for example and may need to be converted to the other.

    Also, before you try outputting directly to your control software, you may want to set up a receiving socket to see if the code being sent out is working and in the correct format. There is a listener app provided by DCS for TCP. You could try it first to see if my code works as written before changing it to UDP.

    For values you don’t use in LFS outsim you need to send out a value equal to center position for them (except time) in the lua code too assuming your control software expects an array of values. Send them in the same order value1 listed them in the lfs plugin and be sure not to exceed the precision they are dimentioned for.
    Last edited: Jul 31, 2014
  8. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    All,
    I would like to thank you for posting. I've been researching lua and LFS outsim for the last several days trying to get a better understanding of what needs to happen in order for DCS World to send the correct data to achieve motion on my platform. This is far more then I can handle since I don't have any programming experience and not enough information on how the FD301 Force Control interprets the data it receives.

    I guess I will just have to live with boring MSFS-X with a F-16 add-on. :(

    Fraza44
  9. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,160
    Location:
    Oklahoma City, USA
    Balance:
    15,973Coins
    Ratings:
    +1,821 / 32 / -1
    @Fraza44 , Sorry but I thought you had some programming experience, just not in lua. Since simtools already has a DCS plugin, if it is working properly, I don't know why the information can't be converted to an outsim format for you. If your 301 already works with LFS, then emulating its output with DCS data should work too! It will just think its running LFS. I awaiting an answer on the DCS plugin status.
  10. value1

    value1 Nerd Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,178
    Location:
    Zug, Switzerland
    Balance:
    9,237Coins
    Ratings:
    +3,226 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    It's about 72 hours since your first post. You have received a lot of help. With many people involved. And you're giving up already!?! How impatient does one have to be…
    upload_2014-8-1_6-10-39.png
    • Agree Agree x 3
  11. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    Value1,

    It's not that I really want to give up as much as I don't understand all the programing lingo and I've search and search for post related to lua scripts, LFS Outsim, Codemaster programs, and all other sort of stuff related to this problem and just can't get my head rap around how to approach this problem.

    I'm also afraid if I finally do get a direct connection from DCS to my FD301 and the value DCS are wrong it may damage my platform. That the one thing that worries me the most. I've witness what happens when my platform get bad data sent to and it ain't pretty. One time me and my son had the thing stuck at full extension of all three dof's and thought it was going to go through the ceiling. A few other times, it's slammed done on the bass hard enough to bend the sheet metal.

    This thing weighs in at about 700 lbs and it's no joke on the force it can throw. My friend Mark had one of his axis go through his wall.

    Once I step back and take a breather, I'll probably jump back in because I really want DCS A10C to work with my platform. I researched all the other combat flight sim games and DCS A10C seems to be the best for me. Jane's F-18 and Falcon 4.0 BMS seem just as complicated to get data output and they both are dated.

    Fraza44
  12. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,160
    Location:
    Oklahoma City, USA
    Balance:
    15,973Coins
    Ratings:
    +1,821 / 32 / -1
    Its not a matter of if it happens, just when I think @Fraza44 . But soon I hope. I thought you already had a little experience programming so, with the time I had available, I was trying to help you help yourself. And you did try so that’s worth something! It’s sometimes hard to wrap your head around things, but once you get it, its not hard.

    So its been a couple of years at least since I got into this lua and outsim stuff so, on my own curiosity and wishing to refresh my knowledge, I dug back into it tonight. I believe I know what needs to be done now. I haven’t gotten into the new scripting, but I think the link I gave said there is a way to auto update it. But that can be dealt with later if needed.

    There is a thing though. Lua has only one variable precision, double (very high). So I’m not sure how to deal with that except I found that a possible version exist that will execute only in single precision. It will handle the uInteger in outsim also. But the game ID value needs a long and I don’t know how to deal with that because I believe that’s an 80 bit number. Can you shed some light on this @value1 and do you have any suggestions? Maybe another app needed to take it from lua so it can be sent to the 301 in the proper format? Or maybe do it with simtools somehow? Chime in @yobuddy or others if you wish.
  13. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,782
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    33,728Coins
    Ratings:
    +3,904 / 10 / -0
    I would certainly isolate the actuators while trying to figure it out.
    Maybe take the seat part off so its a bit safer while playing with it.

    @BlazinH
    I don't think the game ID value would do anything as its set in the lfs ini file for the game and he got LFS working without setting its value?

    @Fraza44
    It looks like you already know everthing you need?
    It takes UDP packets on port 25010.
    you have the ip set to 192.168.0.105.
    And it uses the LFS output structure as Value1 pointed out above.

    Since LFS worked, the first thing I would do is try a codemaster game as it spits out the same packets.
    yobuddy
    • Agree Agree x 1
  14. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    All,

    I was up until 5am Sat. experimenting with Simtools + LFS+FD301 Force Control. I got to the point were I got FD301 Force Control to see the game machine. What I did was setup the "Outsim" to output to the Simtools, then attempted to send data from Simtools to FD301 Force Control. Everything seem to connect on the ports and but the only thing the platform would do is shudder slightly. I never could get it to responded to the "Output" testing.

    I've been going through every lua file in DSC. I found a "Export Lua" under a folder called backup001 which had a Export.lua file created for Simtools which output to UDP port.

    Fraza44
  15. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    All,

    I felt it was time for a little fun with the FD301, after all I didn't get it just to spend all my time trying to figure lua script out. I installed MSFS-X and took my platform out for it first really good spend and it was allot of fun:grin. I had the F-16 addon install so I've been playing with the overall force, pitch, roll filter aggressive controls to make the platform more responsive in order to match how a jet fighter would perform.

    I still plan to peruse the DCS implementation with my platform because I this is would not only help me out but also provide feed back for other who maybe building a platform similar to a FD301/401.

    Andre
  16. value1

    value1 Nerd Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,178
    Location:
    Zug, Switzerland
    Balance:
    9,237Coins
    Ratings:
    +3,226 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    @Fraza44
    This plugin is kind of a proof-of-concept.
    It collects the data from DCS, converts it into LFS format and outputs to UDP port 192.168.0.105:25010

    Currently only pitch, roll (bank) and yaw (heading) are implemented. If succesfull, I can implement the other values too (they are currently all 0)

    I have tested the plugin with DCS 1.2.6 because this was available on my PC.
    Edit: 1.2.9 worx too.

    • Open SimTools_PluginUpdater.exe
    • Drag-n-drop the plugin into SimTools_PluginUpdater.exe
    • Close SimTools_PluginUpdater.exe and open SimTools GameManager
    • Patch DCS with SimTools GameManager
    • Run SimTools GameEngine
    • Run DCS
    • If SimTools and DCS connect, you will see flickering numbers in the Tuning Centre
    • Carefully startup your FD301 and see if it connects
    Please report back :)

    Attached Files:

    • Like Like x 1
    Last edited: Aug 2, 2014
  17. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    Value1,

    Thank you for the direction I will give it a go. Right not I'm going through all the emials that I received from Forced Dynamics and my friend Mark who has a FD301. I need to determine for sure if the whether or not the data is being sent to the UDP or TCP port because I'm starting to wonder.

    I've spent the last three days doing nothing but Sim stuff and the wife is a little put out with me so I have to go do the quality time thing we married men do.

    Fraza44
  18. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    Value1,

    YOU ARE THE MAN!!!!!!!!! :grin This is the closet we gotten to communication. So here are the results of following your instructions.

    1. As the screenshots will show, I was able to establish comm between DCS and Simtools Game Engine. The "Output Testing" tab showed "Game On" when I started DCS. When I opened "Tuning Center" I could see the Max & Min data, (see screen shot).

    2. Once I configured the Game Engine Network Output with the correct IP and Port number, the FD301 Force Control recognized the IP and allowed data to flow through it to the Platform.

    3. The platform would only shake when I pressed "Fly" within DSC but once I exited the flying it stopped shaking. It did not respond to any movement on the joystick just continually shaking with a very slight bobbing up and down of all three axis. The shaking was not violent but at a level of about 3 with 10 being the machine thrashing and coming apart as a force guide.

    4. It appeared the the platform did not know what to do with data it was receiving. I have not configured any of the setting in the Game Engine because I don't know what the correct values are for allot of the fields, especially the 'Network Output".

    Fraza44


    Screenshot1.jpg Result of DCS to Simtool comms
    Screenshot2.jpg Comm btw Simtools and FD301 Force Control Software
    1. You can see in the Force Control/301 software, in the "Simulation IP" box that it has an IP address. This means it's receiving data from the Simtools on IP 192.168.0.105 (game computer IP), Port 25010.

    2. The IP address 192.168.0.105 Port 25010 is configured in the Interface Setting "Network Output". I don't know what to put for Output - Bit Range, Output - Type and the rest of the fields which are in the Network Output.
    Last edited by a moderator: Aug 2, 2014
  19. Fraza44

    Fraza44 New Member

    Joined:
    Jul 28, 2014
    Messages:
    20
    Location:
    Pensacola, FL
    Balance:
    508Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    3DOF
    All,

    I received the below information from my Mark, the other owner of a FD301. He explains making force adjustment in the software and what each button does. I've also include a page from the manual which show the various force button. I don't know if this is something which maybe need or not.

    "First off you have to understand that the settings are center around a car and not a plane;

    Overall Force is like a volume control, the more you slide it to the right the greater the amplitude.

    Sustained Force is like a dampener the farther to the right the longer a move takes to complete

    Instant force This work on things that BUMP like landing when the wheels touch down (don't remember which direction is higher)

    Chassis Ref is the "body roll"

    Filter aggression is how fast the platform reacts to changes

    Z is vertical Straight up and down motion

    Rotational filter would simulate flat spin

    If you want a smoother ride I would set overall @ 60 Sustained @ 70 and instant @ 15

    Run in free flight mode and you can pause the game and make adjustments if you put the 301 software on one of the touch screens.
    Only adjust one at a time then test and so on. The adjustment are real time so you can feel it right away.
    When your done just save the settings and next time you start they will be there.


    Fraza44

    Attached Files:

  20. value1

    value1 Nerd Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,178
    Location:
    Zug, Switzerland
    Balance:
    9,237Coins
    Ratings:
    +3,226 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    Hi @Fraza44
    Have you set an interface in SimTools? It's a little counterintuitive but you must assign an interface for SimTools to output the data although you're not going to use it at all.
    • Open the GameEngine window
    • Click on InterfaceSettings
    Interface Settings.jpg
    • Select Output Type SER
    Output Type.jpg
    • Select Presets All Out
    Presets.jpg
    • Select any unused ComPort
    Comport.jpg
    • Click on Save

    While flying you should now see changing values in the Tuning Centre:
    TuningCentre.jpg
    With a little luck, your FD301 will move now ;)
    • Like Like x 1