Hello dear boardmembers,
First, I want to compliment all developers of Speed Dreams on their great work. For an assignment I was searching for an open source racing sim and Speed Dreams is by far the best I could find! Before posing my question to you I will first explain a little bit more about what I want to do.
I am a student Electrical Engineering and currently following an internship at a company. For my assignment I want to create a system with two electric motors to simulate a real world driving scenario. The first motor would be the motor from an electric vehicle. The driveshaft of this motor is coupled to the driveshaft of the second motor. The second motor would simulate a real world driving load by providing a torque that is calculated from all kinds of frictions, mass inertia’s, tire gripe etc. I want to incorporate this system into the Speed Dreams driving sim. So instead of inputting a gas throttle as you would normally do I want to input a motor RPM (or rad/s or whatever) from a real into the game. And I also want to output a torque request to the second motor so I would like to calculate this torque from within the game.
My question is: Is this possible without disrupting the software structure of the game too much? I’ve taken a look at the software and especially the simu-parts and to me it looks like I have to cut out the engine simulation part (engine simulation is not needed because I have a real world engine;-)) and put back a method that sends the speed measured by a sensor on the electric motors to the transmission. Am I looking in the right place and is this possible without disturbing other pieces of the software too much?
For the simulation/calculation of the torque for the second motor I still have to find out how I could calculate this or where it is done currently.
If anybody can give me tips, hints or other thoughts on this problem and where to look I would be very grateful!
(P.S. Please forgive me for any mistakes in my English)