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 Deciphering SimTools Data

Discussion in 'SimTools DIY Version' started by Metaverum, Jan 18, 2019.

  1. Metaverum

    Metaverum Member Gold Contributor

    Joined:
    Jan 10, 2019
    Messages:
    36
    Balance:
    146Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Hello all,

    I am not sure if this is the best title for this thread but here we go. I just finished writing a little plugin that connects SimTools to SketchUp through MSPhysics. It is sort of an upgrade to what @value1 made years ago. I had some problems with that one due to having to install older versions of SketchUp and SketchyPhysics, the latter of which I believe is not being updated anymore. MSPhysics is still quite relevant and can be used with the latest version of SketchUp. It can also be downloaded directly from SketchUp's extension warehouse without any hassle. Its developer is also quite responsive to support questions. All in all, it makes the process easier.

    Anyway, the code part of the plugin is done. I plan to release an extensive tutorial on how to get it running once I figure out how to get roll and pitch motions working. I never built a simulator before so I am not very knowledgeable. I just know how to program. :D

    Okay, to the point:

    I am testing with output from Live for Speed, attached images are my axis assignments and interface settings. I receive the data in SketchUp and debug it to the console. I just want to know what these numbers exactly represent. Getting traction loss to work was quite easy but pitch and roll are not working as I expected.

    As you can see in the image titled "Capture", I get a float value of 131 from Axis 1, 138 from Axis 2 and 126 from Axis 3. I am also tracking the tuning center below and do not quite understand how the values in the tuning center translate to those 3 float values that SketchUp is receiving. Keep in mind traction loss right now works perfectly, so I did at least that one right. I might have set up the joints incorrectly in the model.

    Joints take float values between 0 and 360, as degrees. I can also translate the values and have them take radians. I can also limit the values to any range between 0 and 360, so that the servo's are not allowed to make a full circle. Anyway, help would be appreciated here! I will release my findings as a tutorial once this is figured out.

    Thank you!

    Attached Files:

  2. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,095
    Location:
    Portugal
    Balance:
    14,900Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    You are outputting axis in 8 bits, so values from 0 to 255.
    Since you are using 0 to 360 in Sketchup, you have to convert the 0 to 255 range in 0 to 360.
    • Informative Informative x 2
    • Agree Agree x 1
  3. Metaverum

    Metaverum Member Gold Contributor

    Joined:
    Jan 10, 2019
    Messages:
    36
    Balance:
    146Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    Okay I am getting some sensible movement now, still not the best but that might be model related. Could you also tell me what the black and orange boxes under "Dir" means? I assume it reverses the direction of the servo movement but not sure what forces that applies to.

    I modelled a simpleton 3DOF version using piston joints to imitate linear actuators. I'll try to get this to work somehow with a flight simulator of sorts so I can add to the tutorial. Any help or advice is appreciated. :D

    Attached Files:

    Last edited: Jan 18, 2019
  4. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,095
    Location:
    Portugal
    Balance:
    14,900Coins
    Ratings:
    +2,504 / 17 / -0
    My Motion Simulator:
    6DOF
    Yes, it reverses direction.
    Simtools output with 8 bits is 0 to 255. Middle is 127 or 128.
    The value you get from simtools is related to the tuning center.
    Imagine tuning center has a minimum/maximum value of -20/20 for roll.
    It will spread that value over the 255 values, so 0 will correspond to -20 and 255 to 20.
    You don't know how much is that 20, it could be 10º, 20º or 30º.
    Most of the game plugins output values that are in a range related to the type of variables used, you don't know their real physical value, so you can't really convert them to a specific value.
    That's up to you to make it and decide that for a specific game 0 might be -10º and 255 +10º.

    You could share the script you are using in MSPhysics. How do you assign a specific value to the joint?
    • Like Like x 1
    • Informative Informative x 1
  5. Metaverum

    Metaverum Member Gold Contributor

    Joined:
    Jan 10, 2019
    Messages:
    36
    Balance:
    146Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    I attached the joint properties and the source code. As you can see I set the degree range to between -40 and 40, then I remap the float value I receive from SimTools. I assign the variable using set_var and use it to move the joint using get_var at every frame.

    I believe the source is pretty much done, though somethings might be off with the joint properties or the model itself (collision, mass, positioning of the rods etc). I will try and see how the 3DOF model works out. How does that one look?

    Attached Files:

    • Like Like x 2
  6. Metaverum

    Metaverum Member Gold Contributor

    Joined:
    Jan 10, 2019
    Messages:
    36
    Balance:
    146Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF
    I was out for a few days due to sickness, anyway, back to solving this now. Unfortunately the 2DOF model in the original post still doesn't work very accurately but it sorta resembles the in-game movement. I am trying this 3DOF model now and put the following axis assignments. Heave seems to work when I move the car onto grass or rocks, the model does that nice shaking motion.. but other motions aren't there. Also, I am trying to replicate linear actuators in the 3DOF model unlike the 2DOF one.

    I would like to resolve this here so when I finally make a thread on how to set this up from scratch, I can lay down all information at once and make it easy for newbies like me to understand.

    Attached Files: