Car physics to spreadsheet

Discussion in 'Car Modding' started by Leonardo Nogueira, Jul 16, 2019.

  1. Leonardo Nogueira

    Leonardo Nogueira Registered

    Joined:
    Apr 1, 2016
    Messages:
    173
    Likes Received:
    158
    We can use the rF2 Physics Calculator spreadsheets to create the car physycs... but is it possible do the opposite, convert the physics files of a car to the spreadsheets to change some real world values or to use some equal specs in another cars, for example?
     
  2. Marcel Offermans

    Marcel Offermans Administrator Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    577
    Likes Received:
    2,548
    I don't think anybody ever attempted that. I guess a lot of data could be transformed in both ways. We've never seen a use for it ourselves.
     
  3. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    I've done it. A great way to learn rf2 physics editing.
     
    vancstar likes this.
  4. vancstar

    vancstar Registered

    Joined:
    Oct 5, 2010
    Messages:
    128
    Likes Received:
    16
    Did you do it manually Jokeri or do you have a utility, though some stuff is protected, with the more open stuff it would be a good way to see what the new additions are in updates this way.
     
  5. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    It is possible for the hdv and engine and other files.
    But tell me, how do you get the suspension points, when you only have the chassis.ini file and no pm file?
    To calculate the suspension points 'backwards' in a direct way, when you only have the chassis.ini, is not possible in my opinion.
     
  6. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    Yes, manually.

    Suspension points are connected to the center of the inertia box, so you need to take into account where inertia box is located.
     
    Emery and Corti like this.
  7. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    That probably works for the inner suspension points, but i doubt that you can calculate the outer suspension points.
    I did follow the formulas in the spreadsheet some time ago and there are so many values involved, to calculate the outer suspension points, that you would have to calculate with 3 or 4 unknown values, when you want to calculate it backwards, which is impossible in my opinion.
    But maybe you have found a way. :)
    Would you mind to send me the formula, that you use for the localoffsetB values of the suspension arms, with that i can calculate their absolute positions, as they are used in a pm file?
     
  8. Leonardo Nogueira

    Leonardo Nogueira Registered

    Joined:
    Apr 1, 2016
    Messages:
    173
    Likes Received:
    158
    Thanks, I will try it manually too and see if I can have the good results!
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,670
    Likes Received:
    2,539
    @Bernd I'm with you. I think there's only a single solution going one way, to reverse leaves you with unknowns you'll need to take some guesses on. Would be interested to see the solution if that's not the case though.
     
    vancstar likes this.
  10. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    @Lazza Yes, that solution would interest me too.
     
    vancstar and Gilles Benoit like this.
  11. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    Suspension upper and lower outerpoints are just offsets from spindle location. Spindle xyz location plus the value in suspensionarms xyz localoffsetb. Tricky part is to match the inertia box size so it matches the chassis.ini values.
     
  12. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    I have to ckeck that again.
    From my memory it was not that easy to calculate the localoffsetb values of the outer suspensionarm points and that there were more values involved, what made it impossible to calculate it backwards.
    But as said, it is a longer while ago when i did it, so maybe my memory is wrong.
    I'll come back to it, when i have checked it. :)
     
  13. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    @Jokeri I have had some time and did follow the formula again.
    Maybe it's me, because i'm not the best in maths, but after some formulas i had to stop, because i would have needed to calculate with at least 2 unknowns.
    It also can be, that my way, to get the values, is wrong.
    I have used the 0.350 physics spreadsheet.
    My target is, to get the coordinates of the suspension points, by backwards calculating them from the chassis.ini values.
    I use the x coordinate of the outside point of the front left fore lower strut as the example.
    It is the localoffsetb value, that has to be calculated backwards.
    The last formula, that gives the entry in the chassis.ini, is:
    AS23 = LocalOffsetB=(",AO23,",",AP23,",",AQ23,")
    For the x value i have to use AO23.
    AO23 = AV11-D23 (i use only the cell names without "round" an such things)
    AV11 =AP11+AT11
    D23 = Spindle X (can be taken from the chassis.ini)

    AP11 =D24+AN11*COS(AO11+E6*AP9)
    D24 = Wheel X (can be taken from the chassis.ini)
    AN11 =((D24-D11)^2+(E24-E11)^2)^0.5 <--- D11 and E11 are Unknown
    AO11 =ARCTAN2(D11-D24,E11-E24) <--- D11 and E11 are Unknown
    E6 = Radians of Design Camber
    AP9 = Camber Correction (UNKNOWN)
    To calculate AP11, we would have to calculate with at least 2 unknowns, that are D11 and E11, which are the X and Y points of the outer point from that we want to get the X Y Z coordinates.
    And we have E6 (design camber), where you can not know if the value in the hdv was set properly.
    And we have AP9, which is a camber correction modifier, from that you can not know if it was used or not.
    In the end, that are 4 unknowns.

    AT11 =D24+AR11*COS(AS11)-D11
    D24 = Wheel X (can be taken from the chassis.ini)
    AR11 =((D24-D11)^2+ABS(F24-F11)^2)^0.5
    AS11 =ARCTAN2(D11-D24,F11-F24)+E7*AT9
    D11 = Front Lower Outer X
    Same here, we again have D11 and instead of E11, we have F11 (Z coordinate of the outer point)
    And we have E7 (design toe), where you can not know if the value in the hdv was set properly.
    And we have AT9, which is a toe correction modifier, from that you can not know if it was used or not.

    From my point of view, it is imposible to get the suspension points, by calculating them in this way.
    Even if you use the try and error method.
    With 2 and more unknown values, you can not be sure to get the proper values in the end.

    It really would interest me, how you do calculate it.
     
  14. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    Could you share the hdv and chassis.ini
     
  15. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    2,184
    Likes Received:
    1,333
  16. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    I have no specific hdv and chassis.ini.
    It don't matters which one you use, because it is the same with all cars.
    It is a mathematical thing.
    But you can use the hdv and chassis.ini, that the spreadsheet generates, because you can also get the pm file from it, to be able to check if the from hdv and chassis.ini backwards calculated values are the correct ones.
    The question for me is, how you calculate the outer suspension coordinates.
    There must be a different way that you use or i am just too stupid to be able to do it. :)

    @davehenrie I am no confucious, but i say 'if there is nothing senseful to say, it sometimes is better to not to say it' ;)
    No offence. :)
     
    ApexModding and davehenrie like this.
  17. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    Innerpoints:
    location of front subbody xyz + the localoffsetA xyz value
    Outerpoints:
    location of front spindle xyz + the localoffsetB xyz value
     
  18. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    Thank you Jokeri, that is what i wanted to know. :)
    Almost everything works as you say, with one exception.
    It is the Z coordinate of the outer point.
    As said, the target is, to get the suspension points that have to be entered into the suspension tables for the front and rear axle.
    I use the FL fore lower strut.
    If i use the 0.350 spreadsheet, i have a small difference between the tables Z entry of the outer point, which is -1.76414 (cell F11) and the value that is calculated with your formula, which is -1,7639549.
    There difference is caused by a calculation, that involves the toe.
    It is this one:
    the Z value comes from cell AQ23
    AQ23 =AX11-F23
    F23= Spindle Z coordinate, can be taken from the chassis.ini

    AX11=F11+AU11
    F11= Z coordinate that we want to get

    AU11=F24+AR11*SIN(AS11)-F11
    F24=Wheel Z coordinate, can be taken from the chassis.ini
    F11= Z coordinate that we want to get
    AR11=((D24-D11)^2+(F24-F11)^2)^0.5
    AS11=ARCTAN2(D11-D24,F11-F24)+E7*AT9

    The bold marked formulas already use the value that we want to get (F11) and i don't think that it is possible to get that value by calculating backwards.
    Or is it possible and i am just not able to do it?
    So, in my opinion, if you use your method, you get the almost correct suspension values.
    And if you can live with the small offset of the Z coordinate, it works to calculate it in that way that you use.
    But you don't get the 100% correct values.
    But as said, if it is possible to calculate the correct F11 value backwards, you can get all the correct values. :)
     
  19. Jokeri

    Jokeri Registered

    Joined:
    May 17, 2014
    Messages:
    179
    Likes Received:
    24
    And if you change the toe correction to zero?
     
  20. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    941
    Likes Received:
    444
    Hello @Jokeri . As said, i am no mathematical genius. :)
    Maybe it is better to understand where i struggle, when i write it in a different way.
    In the school i did learn, that you can calculate unknown values in a formula, by changing the formula, that the unknown value is on one side and the known values are on the other side.
    In this case, we want to have the Z value of the outer point, that is in cell F11.
    And the Formula from that we have to start, is the one that defines the point in the chassis.ini, as localoffsetb.
    This formula is this:
    AQ23 =AX11-F23
    where AQ23 is the Z value of the localoffsetb.
    Because the cell AX11 and other cells, that are involved into the backwards calculation later, also contain formulas, the above formula normally looks like this:
    AQ23=(F11+(F24+((ABS(D24-D11)^2+ABS(F24-F11)^2)^0.5)*SIN(ARCTAN2(D11-D24,F11-F24)+E7*AT9)-F11))-F23
    The unknown values in this formula are F11 (what we want to get) and AT9 (toe correction).
    I can not use 0 for AT9, because i want to get the correct value for F11, so i can not calculate with guesses.
    And even if AT9 would be known, can you get the correct value of F11 from the above formula?
    I'm not able to get it. :)
     

Share This Page