1. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  2. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.25 Bug Reporting thread
    Solutions and more information may already be available.

MotionSim Enabled

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by FlyPT!, Oct 3, 2019.

  1. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    Hi,

    I'm sorry if this was answered already or the info is somewhere, but I can't find it.
    What data, units and variable type are sent through UDP with MotioSim Enabled?
    From my tests, this is what is sent:

    Byte 0 to 3 - ?

    Byte 4 to 7 - Float - X position in world coordinates - m
    Byte 8 to 11 - Float - Y position in world coordinates - m
    Byte 12 to 15 - Float - Z position in world coordinates - m

    Byte 16 to 19 - Float - Lateral speed in local coordinates - m/s
    Byte 20 to 23- Float - Longitudinal speed in local coordinates - m/s
    Byte 24 to 27- Float - Vertical speed in local coordinates - m/s

    Byte 28 to 31- Float - Lateral acceleration in local coordinates - m/ss or g's ?
    Byte 32 to 35 - Float - Longitudinal acceleration in local coordinates -m/ss or g's ?
    Byte 36 to 39 - Float - Vertical acceleration in local coordinates -m/ss or g's ?

    Byte 40 to 51 - ? - Can it be accelerations with gravity ?

    Byte 52 to 55 - Float - Roll - rad
    Byte 56 to 59 - Float - Pitch - rad
    Byte 60 to 63 - Float - Yaw - rad

    Byte 64 to 67 - Float - Roll speed - rad/s
    Byte 68 to 71- Float - Pitch speed - rad/s
    Byte 72 to 75- Float - Yaw speed - rad/s

    Byte 76 to 79 - Float - Roll acceleration - rad/ss
    Byte 80 to 83 - Float - Pitch acceleration - rad/ss
    Byte 84 to 88 - Float - Yaw acceleration - rad/ss

    I'm making a source for my motion program: FlyPT Mover
    Take a look here: https://www.xsimulator.net/community/threads/flypt-mover-interface.13464/



    I think I have the data almost right, but I want to be sure. Thank's.
     
  2. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,841
    You can take a look at the motionSim.lua file in /lua/vehicle/ :)
     
    • Like Like x 1
  3. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    Just read your project. This shit is cool! I hope you can post a video of you playing BeamNG with this at some point; that may just be enough motivation for me to get researching into this.
     
    • Like Like x 1
  4. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    Thank's!

    I should have looked for it.
    Everything inside. It's enough data for the motion sim and easier to activate in the game for the users instead of making patches and lua scripts.
    Just missing in accelerations are G's or m/ss. But I can test it better to see the type of units.

    More info, only if it was suspension data (if that's exposed). But it will be for a next update. And that will require an update in the lua scripts.
    --- Post updated ---
    If you ever go this route (warning it's a dangerous one with high addiction) :p, just go all over the xsimulator forums.
    There's lot's of ideas there and great people to help.

    My rig build is here: https://www.xsimulator.net/community/threads/flypt-6dof-brushless-diy-actuators.10799/
    Made everything from scratch.
    I will make a video with BeamNG. I'm just making some rig changes to accommodate new hardware (wheel and pedals), so it's deactivated right now.
    But here's a video of some tests:

     
  5. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,841
    We try to use SI units whenever possible so m/s^2 :)
     
    • Like Like x 1
  6. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    It's now working!
    Here's a video of BeamNG.Driver with Mover:
    (frame rate is not the best... sorry)



    Soon with the real hexapod rig.
     
    • Like Like x 2
  7. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    Amazing. Can't wait to see a filmed demo!
    Is there any sort of "pre-built" solution for this sort of thing or is it very much hobbyist and has to be made from scratch?
     
  8. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    There ar many comercial options. Some better than others, but expensive.
    For now, I think it's possible to achieve the same results with a DIY spending less.
    As it stands right now, and it's my opinion, this type of hardware requires to much work from the user.
    I don't think there's an easy to use solution right now. All users end tuning all the parameters, so honestly, nothing better than DIY. That way you know exactly what is going on.
    Also you can have different levels of DIY. You can buy all the actuators and controllers, ready to plugin, and just build the structure, or go deeper and make your own way of controlling the motors.

    Go to the XSimulator forums. There you have a section for comercial rigs besides the DIY.

    EDIT:
    I will make a movie. But I'm making some changes on the rig. I had to dismantle a section to install new pedals and a new wheel.
    Waiting for some parts. Maybe next week (I hope).
     
  9. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    I figured this was the case as the demand for this is only for the hardest core simmers.
     
  10. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    Took to long, sorry.

    Here's a video of some tests I made:
     
    • Like Like x 2
    • Staff Pick Staff Pick x 1
  11. joesphan lu

    joesphan lu
    Expand Collapse

    Joined:
    Aug 5, 2020
    Messages:
    5
    Hello FlyPT! I am attempting to create a similar project, I used wireshark to sniff out the UDP data, but I have no idea how to decode it. I assume you may have some reference, could you point me in the right direction? Thanks
     
  12. FlyPT!

    FlyPT!
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    8
    Hi,

    I just grab the UDP and get the data from it. You can do it in C#.
    In the first post of this page you have the UDP data described. Just pick the bytes and convert them to a float.
    It's not so simple, but fastest way to explain it. You need to know how to do it in code.
    Use my software (Mover) to move your rig, it includes data from Beamng and other games.
    Go here to get the software: https://www.xsimulator.net/community/threads/flypt-mover.13464/ it's free.
    I'm working on a new version to release in the next weeks with some updates.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice