1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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!
  3. 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
  4. 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

Ground Movement on Simtools

Discussion in 'Digital Combat Simulators (DCS)' started by EICHELBERGER Robin, Apr 10, 2021.

  1. EICHELBERGER Robin

    EICHELBERGER Robin Ayshel

    Joined:
    May 12, 2019
    Messages:
    8
    Occupation:
    Piloting Plane
    Location:
    France
    Balance:
    - 48Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Hello Everyone !

    Today I'm coming to you to ask you for help on an improvement, for a Plugin Modification !

    I mostly use my Motion Simulator on DCS and everything works fine (Yaw, Roll, Pitch etc..) but I would like to modify the plugin to do something more:

    I would like that when the plane is on the ground (and proportionally to its speed) the Simulator makes small variations in Surge and Sway to feel the vibrations and shaking due to the runway. So to summarize, when I take off :


    CURRENTLY : The surge (longitudinal acceleration) increases with the acceleration of the plane, then the pitch increases when the plane takes off, and that's it !


    WHAT I WANT TO DO: The surge increases with the acceleration and the faster the ground speed increases, the more I feel vibrations in Sway (left/right) and in Surge (Forward and Backwar) (I am with 2DOF). So the faster I go the more it vibrates, then I take off the plane, so the pitch increases as I pitch up, and as soon as I leave the ground, the ground vibrations stop. Just like in real life !!


    I have no background in plugin development but I would love to learn! Is there anyone here who could help me and/or point me to existing tutorials that could answer my question?

    Thank you everyone ! Have a nice day !
  2. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Whqr type of actuators do you have ?
  3. EICHELBERGER Robin

    EICHELBERGER Robin Ayshel

    Joined:
    May 12, 2019
    Messages:
    8
    Occupation:
    Piloting Plane
    Location:
    France
    Balance:
    - 48Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    [​IMG]
    Hello ! It's one like this, but I was thinking more about something to do in the DCS plugin, not a physical shaker. (To include the vibration in the "Surge" and "Sway" value in Simtools Tuning Center !)
    I know a little about programming but I would need some data to do the thing myself :
    How are named all the value (pitch, roll, yaw etc..) in the code
    How can I extract the speed value from DCS
    How can I extract the high of the airplane (known as Radar Altitude) to know if the plane is on ground or not)
    If I have all of these I think I will do this myself !
    Thank you for your help !
  4. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    You may be able to adjust the sensitivity of your potentiometers based on altitude or airspeed

    Do you use smc3 code ?

    Can simtools access airspeed / altitude ?
  5. EICHELBERGER Robin

    EICHELBERGER Robin Ayshel

    Joined:
    May 12, 2019
    Messages:
    8
    Occupation:
    Piloting Plane
    Location:
    France
    Balance:
    - 48Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    I don't know what is smc3 code, I told i know programming because I do a lot of Python and Java so I understand a bit of simple code (I just have to do some addition/multiplication to do the change in the code)

    I don't know if simtools can access those but Simtools can extract Pitch,Roll,Yaw etc so Yes I think it's not gonna be difficult to extract another data !
  6. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    How do you control your actuators ?
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,524
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,974Coins
    Ratings:
    +10,774 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  8. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,212Coins
    Ratings:
    +594 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Hi @EICHELBERGER Robin ,

    did you already have a look at @Dirty ‘s Experimental DCS Plugin?
    https://www.xsimulator.net/community/threads/experimental-dcs-plugin-ready-for-testing.13560/

    It allows you to configure the plugin via a LUA script and already provides a variable that indicates whether the plane is on ground or airborne.

    DCS itself has a ton of variables that you can read via this LUA script.
    As an example, I managed to get a humming vibration while the landing gear is extracting or retracting, and I did this by reading the value of the variable that indicates whether the red landing gear light of the TF51D is turned on. (Many of these things depend on the plane you are using.)

    @Dirty has already added an OnGround variable to his LUA script, and you can use it for modifying the data that is sent to Game Engine, Game Dash, and Game Vibe.

    Also the current speed is already accessible.
  9. EICHELBERGER Robin

    EICHELBERGER Robin Ayshel

    Joined:
    May 12, 2019
    Messages:
    8
    Occupation:
    Piloting Plane
    Location:
    France
    Balance:
    - 48Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Hello everyone ! Thank you all for your reply ! This looks like amazing stuff for me !

    I'll tell you if I manage to do something I want with that !

    Have a nice day !
    • Like Like x 1
  10. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    736
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,832Coins
    Ratings:
    +864 / 2 / -0
    Hey :)

    What you want to do sounds doable. If you can do a little bit of coding then you CAN do all this inside the export script. In my plugin as well as in the original plugin!

    However, keep in mind that the real magic of motion cueing happens inside the highpass and lowpass filters. As far as I know SimTools is not all that well equipped with those. Also the behaviour of the HP and LP filters changes with the processing rate. So, if you want to code HP and LP filters inside the export script, then you will be faced with filters that change with your games framerate. :) It is going to be OK, but not what I would call a clean solution.

    Also, take a look at Mover. It has significantly more options when it comes to filters.

    If you need any data out of DCS, I can probably help you. Most data is readily available and some has to be dug up from a particular aircraft model, as @MarkusB mentioned.

    Let me know what data you need and I might be able to find it.

    Cheers,... Dirty
  11. EICHELBERGER Robin

    EICHELBERGER Robin Ayshel

    Joined:
    May 12, 2019
    Messages:
    8
    Occupation:
    Piloting Plane
    Location:
    France
    Balance:
    - 48Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Hello Dirty, Thank you for your reply ! I started to read your work on the Experimental Plugin of DCS, amazing work !

    I just downloaded it for the moment but I have some difficulies to run it (No data in tuning center so no transmission from DCS) I use DCS open Beta, maybe it can be a problem ?

    You talk about Mover : Is it a Software like Simtools ? I've never heard of it before, I thought Simtools was the only solution !

    I don't understand either the notion of "High Filter" and "Low Filter" you're talking about, maybe you can explain me a little about that ?

    About the data I want to Extract, i want to know : Ground speed, Plane on the ground or not

    I saw that there are already in the Experimental plugin but like I said I have some difficuties to make it work !

    To explain more about my idea of imagination, let "Surge" be the value of Surge in the actual programm, "OnGround" 1 if on the ground, 0 else, and "Speed" the ground speed

    With that I just want to add this simple code line :

    Surge = Surge + (RandomValueBetween- 2 and 2)*Ground*Speed
    the same for the Sway

    This allow to have some vibration proportional to the speed !

    In a perfect world where i Can create a sinusoidale function from the DCS Time, it would be something like :

    Surge = Surge + Sin(Time)*Ground*Speed

    With that the vibration is more an oscillation than a random shake

    I hope you can help me with that ! I never stop thinking of my simulator with that modification !
  12. Dirty

    Dirty Well-Known Member Gold Contributor

    Joined:
    Oct 15, 2017
    Messages:
    736
    Occupation:
    All the way up front.
    Location:
    Germany
    Balance:
    7,832Coins
    Ratings:
    +864 / 2 / -0
    Hey Robin,

    if you run into problems with my plugin, please describe the issue in the dedicated discussion section of the plugin page, or in the general thread on the plugin that I opened earlier. That way other users can benefit fom the answers as well :)
    Up until now, I was able to resolve all issues that other users had, so I'm confident we will sort out your problems as well.

    On Filters:
    I have made a little video series that I linked to in this thread. If you never heard of HP or LP filters this might be a good starting point. Filters are what makes the motion!

    Then you are going to go down a pretty deep rabbit hole now :) I know exactly what you are talking about. I've been there. Be prepared for a journey that will bring you close to insanity though :)

    On DCS:
    Code:
    --Weight On Wheels?
        LeftGear = Export.LoGetAircraftDrawArgumentValue(6)
        NoseGear = Export.LoGetAircraftDrawArgumentValue(1)
        RightGear = Export.LoGetAircraftDrawArgumentValue(4)
      
        --OnGround status is determined by the compression of ANY gear strut
        if (LeftGear > 0 or NoseGear > 0 or RightGear > 0)
            then
                OnGround = 1
            else
                OnGround = 0
        end
    
    --Groundspeed:
       vv = Export.LoGetVectorVelocity()
       GS = math.sqrt( math.pow(vv.x,2) + math.pow(vv.z,2))
    
    
    
    ------------------------------------------------------------------------------------
    ---------------------------   HELPER FUNCTIONS   --------------------------
    ------------------------------------------------------------------------------------
    
    
    function WheelSpin()
       if (OnGround == 1)
           then
               return GS
           else
               return 0
       end 
     
    end
    
    This is the code I use in my export script. You can adapt it for your use.

    It is easiest to do the coding inside the Eport.lua file that resides in "SavedGames/DCS/Scripts". You can read error messages from "SavedGames/DCS/logs/DCS.log". You can find plenty of examples in my Github repo.

    If you use Export.lua (which I highly reccomend!) you will have to remove the "export" prefix in the code I posted above. So, you must use...

    Code:
    IAS = LoGetIndicatedAirSpeed()
    ...instead of...
    Code:
    IAS = Export.LoGetIndicatedAirSpeed()
    Describe your problem over in the plugin thread. We will get it straight, I promise.
    • Informative Informative x 1
    Last edited: Apr 12, 2021