1. This Software is no longer supported by us. Please download the new motion control software SimTools.
    Dismiss Notice
  2. 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
  3. 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!
  4. 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
  5. 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 regarding the USO

Discussion in 'Force-Profiler Simulator Control' started by tronicgr, Jul 3, 2007.

  1. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hello again,

    I was using USO from the first time. Below is the settings I use to retrieve the data:


    [​IMG]


    But after receiving data succesfully for about a minute, then x-sim software reports error writing on serial port:


    [​IMG]

    Why is this happening? The microcontroller I use (BS2) is fast enouph to finish its job within 10ms... A bug on your software maybe?

    Regards, Thanos
  2. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Hi Thanos

    please reload your pics without spaces. The linux server cannot handle them. You could use some underlines (_) instead.

    ego
  3. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Its Ok now... after a lot of testing I managed to fix this comport error by using an RS232 level buffer (MAX232 chip). It works great now and I lowered the baud to 2400 Bps without loss of data!!

    But now I have another kind of problem:

    I connected x-sim software with Live4Speed and used the X,Y acceleration data to drive my motion cockpit. It works really well and you can feel even the smaller acceleration effect but...

    ...While the data are comming right when starting the race, they seem to shift around i.e. from x to y while driving around the circuit. Its like the acceleration data aren't car oriented but circuit oriented...

    See the attached photos where I accelerate in various places in the circuit and receive different values for x,y...


    [​IMG][​IMG]
    [​IMG][​IMG]


    BS2 is Basic Stamp2 microcontroller from http://www.parallax.com.
    I'm using it to receive data from x-sim and in the same time I programmed it to act as servo controller to move and position my car windshield wiper motors. Its better than velleman even if its connected on the serial port.


    Regards, Thanos
  4. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    @Thanos

    You replaced the spaces. Good. Now you have to upload your pics with the Bilder hochladen button, and they will be displayed correctly.

    The problem you have seems to be within the outsim application and not with X-Sim. Perhaps you should post this prob in a LFS Forum. Maybe there is a newer version of the application already.
    X-Sim just uses the outsim plugin.

    @sirnoname

    Sein Problem scheit zu sein, dass outsim im Laufe des Strecke, die Y X Achse tauscht.
  5. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Sirnoname, as you may notice on the photos I gave above, the acceleration direction is relevant to the orientation of the car so you can use this output to calculate the correct x,y acceletation values. It maybe be a simple calculation like shift the x data to y by the amount indicated on the orientation data.

    LFS is a great sim and it would be great to have it working right.

    Thanks, Thanos
  6. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    But why does outsim output such values!? That makes no sense. For example: You are driving virtually from north to south. Accelleration data is correct. After a u-turn you drive from south to west, and the acceleration data have to be inverted, to output correct values. But what is when you drive from east to west, or from west to east?
    Its a bug within LFS, because afaik we never experienced such a behaviour within the outsim application and the demo of LFS.

    Could you please try it with another version of the game? Maybe the demo version of LFS.

    Its think it is a bug within LFS, and not X-SIM. The provided data out of otusim seems to be wrong...

    Perhaps the programmers of outsim or LFS may change something within LFS or outsim.

    Within the demo version of LFS it works correct.

    ego

    BTW: I fixed your pic display prob ;)
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I've tested it on every version I could find, demo or licensed:

    LFS S2 ALPHA V
    LFS S2 ALPHA X

    They all output the same acceleration data... The point its that they are useless in the given form and need some calculations to correct them based on the orientation of the car... :cry:

    Thanos
  8. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Please try to disable the orienation data transmission to outsim in the lfs config file!

    Perhaps it will work then...
  9. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I checked all cfg files but there is no way to individually disable the orientation data.

    I'll try to ask on the LFS forum for support. I searched all their site but no one ever posted anything about interfacing motion cockpit... :?:

    Thanos
  10. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Did you edited these values in the LFS cfg file?

    Conn To Master 1
    OutSim Mode 1
    OutSim Delay 1
    OutSim IP 127.0.0.1
    OutSim Port 4123
    OutSim ID 0
    OutGauge Mode 1
    OutGauge Delay 1
    OutGauge IP 127.0.0.1
    OutGauge Port 4124
    OutGauge ID 0

    Sure you have. If not outsim wouldnt show anything...
  11. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Hi Thanos

    I think I have the solution for your Problem. I've found CW's post (the guy you tried to ask in the LFS forum ;)) in the plugin section.

    He fixed it by using effect nr. 40 for accelleration.

    Here is the his post:
    http://www.x-simulator.de/forum/x-sim-w ... .html#1086

    ego
  12. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    The solution that CW found is to use effect 40 (that is the acceleration per speed) that isn't as accurate as effect 28 which is the real acceleration on y axis.

    Also the effect 30 that is indicaded on the xsim page as the one to use for x axis also suffers from the same orientation issues as effect 27 (x acceleration) does...

    I tried to figure a simple furmula to shift the x data to y as the orientation changes but since the x,y values aren't steady I found it impossible. The only hope now it to get LFS programmers to give a patch that alters the outsim acceleration data to be car oriented!!!


    Thanos
  13. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Will you ask the LFS programmers for it in a forum, or directly via email?

    Just give me a link to where you'll asking for implemtation, and i'll support you.

    ego
  14. CW

    CW Member

    Joined:
    Mar 1, 2007
    Messages:
    56
    Occupation:
    Jack of all
    Location:
    New Zealand
    Balance:
    14Coins
    Ratings:
    +0 / 0 / -0
    gidday, I had exactly the same problem, you could drive in a sustained left hand turn and the motion would go from left to right by itself. I fixed it by not using the inputs (26 27) and used position or something else unfortuanately I have wiped the profile so until tonight I will not know exactly what number forces but there is definitely one which works perfectly for x and y.
  15. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
  16. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Sorry I missed that, I was already posted for help there:

    http://www.lfsforum.net/showthread.php?t=27700

    And I have seen before the link that someone give you there (VBOUTSIM) and it reads the same accelaration values as x-sim...

    Thanos
  17. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    And what about using VBOS Gtek? It seems that there is an extra window in the application with car oriented g-forces!?

    I'm wondering that sdether sais that they are using outsim with their FD301 without problems.
    And whats about the processing, Bob mentions!?
    Perhaps another effect nr. has to be used. Lets wait what CW tells us later...
  18. CW

    CW Member

    Joined:
    Mar 1, 2007
    Messages:
    56
    Occupation:
    Jack of all
    Location:
    New Zealand
    Balance:
    14Coins
    Ratings:
    +0 / 0 / -0
    Gidday Thanos.
    For the live for speed i have checked my rnr file and it is 23 for x and 40 for y reduce your 23 figures down to about 300 max. Hope that helps
  19. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    After taking a closer look on the VBoutsim code I found the math formula we need to convert the acceleration data in the right form so they are car oriented:


    ------------------------------------------------------------------
    Orientation :3 floats Heading, Pitch, Roll
    sngOrientation0 As Single
    sngOrientation1 As Single
    sngOrientation2 As Single

    Acceleration :3 floats X, Y, Z
    sngAcceleration0 As Single
    sngAcceleration1 As Single
    sngAcceleration2 As Single


    txtLatAcceleration.Text = Round((Cos(.sngOrientation0) * .sngAcceleration0 + Sin(.sngOrientation0) * .sngAcceleration1) / 9.81, 2) & g

    txtLongAcceleration.Text = Round((-Sin(.sngOrientation0) * .sngAcceleration0 + Cos(.sngOrientation0) * .sngAcceleration1) / 9.81, 2) & g

    -------------------------------------------------------------------
    Just remove the round to have the best precision in data.

    I checked the outputs of LatAcceleration and LongAcceleration and they output the acceleration values we need!

    I think the best way to add them in x-sim is as additional output effects in the LFS plugin, i.e. effects 1 and 2 that are free.


    Best Regards, Thanos
  20. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    @ sirnoname

    Here is an update of the formula stripped from VB headers:

    LatAcceleration = Cos(Orientation0) * Acceleration0 + Sin(Orientation0) * Acceleration1) / 9.81

    LongAcceleration = -Sin(Orientation0) * Acceleration0 + Cos(Orientation0) * Acceleration1) / 9.81

    If you skip the division by 1G (9.81), it will output the maximum resolution...

    I hope its easy to add it on the LFS plugin. Can't wait to interface it on my motion cockpit!!!


    Thanos