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

Modifying the Live For Speed V3 Plugin

Discussion in 'SimTools Plugins' started by OldGuy, Jul 30, 2016.

  1. OldGuy

    OldGuy New Member

    Joined:
    May 24, 2016
    Messages:
    8
    Location:
    UK
    Balance:
    92Coins
    Ratings:
    +3 / 0 / -0
    Hi All,

    I am seeking to tie into the Live For Speed V3 Plugin, an algorithm I have developed and implemented in Visual Basic. The algorithm takes the body roll, pitch and yaw angles and from these derives the Euler Angles. I would like the SimTools Game Engine to output the Euler Angles and not the car body roll, pitch and yaw angles.

    My Visual Basic code requirements are:
    1. One off object initialisation at the start of a race / practice session
    2. Maintain knowledge of previous car orientation variables (roll/pitch/yaw)
    3. Update and return Euler Angles

    Having studied the Live For Speed Plugin Code I believe that the following modifications should work.

    1) Requirement: One off object initialisation at the start of a race

    Sub ResetDOFVars()
    - place initialisation of the Euler object here (will need to add in class import to Plugin.vb)
    - I am assuming this sub is called at start of race and not at start of gaming session ...

    2) Requirement: Maintain knowledge of previous orientation variables (roll/pitch/yaw)

    a) Class Plugin in Plugin.vb
    - Add declaration of Prev_Roll_Output, Prev_Pitch_Output, Prev_Yaw_Output next to declaration of Roll_Output, Pitch_Output, Yaw_Output

    b) Sub ResetDOFVars() in Plugin.vb
    - place initialisation of the Prev_Roll_Output, Prev_Pitch_Output, Prev_Yaw_Output
    - I am assuming this sub is called at start of race and not at start of gaming session ...

    c) Sub Process_PacketRecieved in Plugin.vb
    - Assign Prev_Roll_Output, Prev_Pitch_Output, Prev_Yaw_Output values before updating the Roll_Output, Pitch_Output, Yaw_Output

    3) Requirement: Update and return Euler Angles

    Sub Process_PacketRecieved in Plugin.vb
    - Add in method to call Euler Angles class
    - Updating Euler Angles using increments in body angles, i.e.
    o dRoll = Roll_Output – Prev_Roll_Output
    o dPitch = Pitch_Output – Prev_Pitch_Output
    o dYaw = Yaw_Output – Prev_Yaw_Output​

    Function Get_RollOutput()
    - Alter function to return the Euler Roll Angle

    Function Get_PitchOutput()
    - Alter function to return the Euler Pitch Angle

    Function Get_YawOutput()
    - Alter function to return the Euler Yaw Angle

    Could you give any guidance on whether the above will work? Err and sorry the post is so long!

    Many thanks,

    OldGuy