Summary
The DCT gearbox shift logic controller handles all the shifting related function of the gearbox, including the different gearbox modes, gear preselection, rev matching, etc.
It is an extension of the vehicle controller and automatically gets called if a vehicle is equiped with a DCT transmission .
File Info
Filename | shiftLogic-dctGearbox.lua |
Path | /lua/vehicle/controller/shiftLogic-dctGearbox.lua |
Usage type | Specific to vehicleController |
JBeam Properties
number
type
2000
default
Minimum RPM for the clutch to start a launch behavior
number
type
3000
default
The RPM the clutch tries to maintain during the launch behavior.
boolean
type
true
default
Enables automatic downshifting when the engine RPM reaches 1.2 times idle RPM.
number
type
0.05
default
How quickly the transmission actuates the clutch when shifting (s)
Electrics
Name
Units/Values
Description
Name
clutchRatio1
Units/Values
0 to 1
Description
Indicates the position of the clutch on the first tranmsission shaft. 0 means it’s disengaged, while 1 means it’s fully engaged.
Name
clutchRatio2
Units/Values
0 to 1
Description
Indicates the position of the clutch on the second tranmsission shaft. 0 means it’s disengaged, while 1 means it’s fully engaged.
Public Functions
Function name
Parameters
Description
Function name
gearboxBehaviorChanged
Parameters
behavior
Description
Switches between arcade and realistic gearbox modes.
Function name
shiftUp
Parameters
Description
Switches to the next position on the gear lever.
Function name
shiftDown
Parameters
Description
Switches to the previous position on the gear lever.
Function name
shiftToGearIndex
Parameters
index
Description
Shifts the gear lever to the selected position.
Function name
getGearName
Parameters
Description
Current gear the transmission is in.
Function name
getGearPosition
Parameters
Description
Current position of the automatic shifter.
Function name
setDefaultForwardMode
Parameters
mode
Description
Changes the gearbox’s default forward mode.
Function name
sendTorqueData
Parameters
Description
Sends torque and power related data to the UI.
Public Properties
Name
Description
Name
brake
Description
Brake input
Name
checkEngine
Description
Indicates if the engine is disabled.
Name
clutchRatio
Description
Indicates clutch input. 1 is fully engaged, 0 is fully disengaged.
Name
currentGearIndex
Description
Current gear index of the gearbox.
Name
energyStorages
Description
Energy storage(s) associated to the engine
Name
engineLoad
Description
Engine load
Name
engineThrottle
Description
Throttle input.
Name
engineTorque
Description
Engine combustion torque, before friction losses.
Name
flywheelTorque
Description
Engine output torque.
Name
gearboxHandling
Description
List containing many of the parameters which influence gearbox shifting behavior.
Name
gearboxTorque
Description
Gearbox output torque.
Name
idleRPM
Description
Engine idle RPM
Name
ignition
Description
Indicates that the ignition is on.
Name
inputValues
Description
List containing the brake, throttle and clutch values.
Name
isArcadeSwitched
Description
Indicates if the gearbox is in arcade mode.
Name
isEngineRunning
Description
Indicates the engine is running
Name
isSportModeActive
Description
Indicates if sport mode is active.
Name
maxRPM
Description
Engine maximum RPM
Name
oilTemp
Description
Oil temperature of the engine.
Name
rpm
Description
Current engine RPM
Name
shiftPreventionData
Description
List containing the slip threshholds to prevent shifting.
Name
shiftBehavior
Description
List containing the current optimal shiftpoints defined by the vehicle controller.
Name
smoothedValues
Description
List containing a smoothed version of some properties.
Name
smoothedAvgAVInput
Description
Smoothed angular velocity of the gearbox input (rad/s)
Name
throttle
Description
Throttle input
Name
timer
Description
List containing current time values
Name
timerConstants
Description
List containing target values for the different timers, as set in the jbeam
Name
waterTemp
Description
Coolant temperature of the engine.
Example Usage
A vehicle controller section with parameters specific to this sub controller, defined within a transmission’s jbeam.
"vehicleController": {
"automaticModes":"PRNDSM",
"calculateOptimalLoadShiftPoints": true,
"shiftDownRPMOffsetCoef":1.2,
"aggressionHoldOffThrottleDelay":3,
"lowShiftDownRPM":[0,0,0,2200,2500,2500,25002500],
"lowShiftUpRPM":[0,0,4300,4200,4050,4000,3800],
"clutchLaunchStartRPM": 3500,
"clutchLaunchTargetRPM": 4000,
"autoDownShiftInM": false,
},