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

Question Using SimTools for data acquisition

Discussion in 'SimTools DIY Version' started by joel043, Feb 3, 2018.

  1. joel043

    joel043 New Member

    Joined:
    Jan 16, 2018
    Messages:
    7
    Occupation:
    Automotive Engineering student
    Location:
    Maastricht, The Netherlands
    Balance:
    137Coins
    Ratings:
    +0 / 0 / -0
    Hi Everyone,

    I'm currently in the process of doing some research for a school project. The project involves actuating a motion simulator through Matlab/Simulink interfacing. Concerning this I have 2 questions at the moment.

    When games output data such as roll and pitch, what are they being compared to? I guess against the center of gravity, is this correct? In reality these things don't act on a single point, they are rotations about the roll and pitch axis, but these don't need to have a common point. That was my reason for asking.

    My other question concerns the SimTools software. To be able to calculate the required motion in Simulink, I need to import the game telemetry data in real time. This could be done by writing applications for each game, but looking at the limited time I have, I was thinking about using SimTools for this. There are a lot of plug-ins for different games and SimTools. Would it be possible to interface Simulink to SimTools itself for extracting the game data? This way I can import the required data from a single location. When I need to simulate another game I only have to download the required plug-in, but I wouldn't have to change anything in my Simulink program.
    What would be the best way to do this? Do I only need to interface with the game manager, or is this impossible without using the game engine?
    I do not need the motion calculations, these I will do myself, I just need the pitch and roll data.

    Thank you for your time!

    Joël
  2. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    this can be done anyway the game creator decides is best, unfortunately there is no standard.
    We fix this problem like this.
    https://www.xsimulator.net/co-ordinate-system/

    Use Axis Assignments in GameEngine to assign Roll to axis1a, Pitch to axis2a and so on, for all 6 dof's.
    (Use traction loss for yaw when a game has it available)
    Then use the Network Interface option in GameEngine to send the data you want over UDP.
    Then collect and make use of the info in the app you need.
    Should work just fine buddy.

    Take care,
    yobuddy
    • Agree Agree x 1
  3. joel043

    joel043 New Member

    Joined:
    Jan 16, 2018
    Messages:
    7
    Occupation:
    Automotive Engineering student
    Location:
    Maastricht, The Netherlands
    Balance:
    137Coins
    Ratings:
    +0 / 0 / -0
    Thank you for your quick response!

    I was aware of the directions of roll and pitch, I just wasn't sure what they were compared to. In the pictures that point is called C, but what is it? Is it the center of gravity or is it just a random point?

    The UDP solution is indeed a good idea, but quickly looking over the topic about creating plug ins that it refers to, I started to wonder one thing. Let's say I just need my program to work for one game, would it not be easier to get the values from one of the plugins itself? Or is that not advised?
    SimTools has the advantage that it can accomodate for different games, but if I need just one, would the plug in example not be easier? I am not capable of investigating the topic thoroughly at this moment, but that's what crossed my mind when I saw the detailed explainations in there.

    Greetings,

    Joël
  4. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    The raw data output of the game plugin would not provide what you need I'm afraid.
    (SimTools still needs to make sense of the output.)
    And using SimTools game plugins with anything other than SimTools itself is not allowed anyway.
    It's against the Eula.

    If you want a game to play with data exportation thou, take a look at Live for Speed.
    Even the demo works for telemetry output.
    And its well documented with its OutSim support.

    Take care buddy,
    yobuddy
  5. joel043

    joel043 New Member

    Joined:
    Jan 16, 2018
    Messages:
    7
    Occupation:
    Automotive Engineering student
    Location:
    Maastricht, The Netherlands
    Balance:
    137Coins
    Ratings:
    +0 / 0 / -0
    Thank you for your response yobuddy.

    I think I will stick with the udp packet solution, also because simulink has block to receive them. This looks like the most plug and play solution to me.
    I still wonder though, what are the values in these packages? Are these absolute values like acceleration, roll and pitch in degrees. What values are represented in what way, because I need the roll and pitch values in degrees for example, not a different value that is calculated for correct motion in the simtools engine.

    Thanks in advance,

    Joël
  6. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
  7. joel043

    joel043 New Member

    Joined:
    Jan 16, 2018
    Messages:
    7
    Occupation:
    Automotive Engineering student
    Location:
    Maastricht, The Netherlands
    Balance:
    137Coins
    Ratings:
    +0 / 0 / -0
    I have configured the output for a network output. The outputs I get are not in degrees and g-forces, but in numbers ranging from 0 to 255 when operating in 8 bit mode (127 being the center value). I know that when looking at roll for example, the value 127 represents the normal position, and 0 and 255 represent maximum roll in their respective directions.
    How much degrees roll do these numbers represent, how is this calculated in simtools? Converting them to degrees is no problem, but I have to know the degree/percentage ratio that simtools uses to convert the game output to the axis output..

    Thanks in advance!

    Joël
  8. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    You have all this configured in SimTools GameEngine buddy.

    This is correct, as you have it configured to output 8 bit.

    actually they are, but because your interface output settings are set to 8bit, you are getting this data represented in 8 bit output.

    The output of a DOF is controlled by the Max/Min settings for that input.

    Let's say you have a input for roll of 10.
    With a Max settings for roll of 10.
    You would get a 255 for the output.

    It seems like what you want to do is set the Min / Max of roll (for example) to -180 , 180.
    So when you capture the roll value you can find the percentage

    Roll Input value = (Input - 127) * (1.417322834645669)

    1.417322834645669 = (180 / 127)
    (So a 255 input would = 180deg)

    Hope that helps buddy!
    yobuddy
    • Informative Informative x 1
  9. gianluca123

    gianluca123 New Member

    Joined:
    Jul 19, 2018
    Messages:
    3
    Balance:
    109Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, Motion platform
    Hi joel! Did you in your project define a plugin (for SimTools) to provide data to Simtools from Simulink?
  10. imajavaid

    imajavaid Member

    Joined:
    Oct 25, 2021
    Messages:
    108
    Balance:
    199Coins
    Ratings:
    +25 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    what is the data acquisition rate of simtools? Is this depends on the game (like xplane) data output rate. or simtools has its own data transfer rate?
  11. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    Yes, it's game dependent. :thumbs
  12. cherrrrry

    cherrrrry New Member

    Joined:
    Oct 27, 2023
    Messages:
    5
    Balance:
    25Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF

    Attached Files:

    • axis.png
      axis.png
      File size:
      160.8 KB
      Views:
      80
  13. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    This means you have only used DOF1 for each axis. Where each fo the 6 axis are driven buy its one DOF.
    I hope this makes sense buddy?
    upload_2023-10-28_10-33-51.png
  14. cherrrrry

    cherrrrry New Member

    Joined:
    Oct 27, 2023
    Messages:
    5
    Balance:
    25Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF
    Thank you for your response. However, for a 6-degree-of-freedom motion simulator, each axis is involved in the motion of each DOF. Why does each Axis here (Axis Assignment page) correspond to only one DOF, for example, "Axis 1a corresponds to DOF1 (Roll 100%)"? If I want to obtain vehicle data from a game, such as yaw angle and acceleration. How can I achieve this using SimTools?
  15. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    SimTools v3 has Stewart platform plugins also.
    Check out the generic 3d plugins seen here:
    https://simtools.us/plugin_library/?varname=Axis&repo_id=1&color=0e97dd

    Yaw will be in degrees and get you your angle.
    Traction loss is basically yaw in acceleration.
    Hope this helps buddy!
  16. cherrrrry

    cherrrrry New Member

    Joined:
    Oct 27, 2023
    Messages:
    5
    Balance:
    25Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Motion platform, 6DOF
    Thanks for your response. Does it means that if I use UDP to output these datas, <Aixs1a> correspons to Roll angle of the vehicle, and <Axis2a> to Pitch angle and so on? Furthermore, I want to get acceleration along x,y,z axis of a vehilce in a game, and angular velocity around thses three axes. Can i achive this by using SimTools?
  17. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,198Coins
    Ratings:
    +5,093 / 18 / -0
    The output you use is dependent on the interface plugin you use.
    If you use the network one, it will be UDP yes.

    You can click on a game plugin and see its data page, and whats available for any game plugin here:
    https://simtools.us/plugin_library/

    For example:
    upload_2023-11-4_17-13-45.png

    Take care,
    yobuddy