Summary
The sequential gearbox shift logic controller handles all the driving assists and related systems when using a sequential gearbox, including the automatic clutch, throttle cut and shifting when driving in arcade mode.
It is an extension of the vehicle controller and automatically gets called if a vehicle is equiped with a sequential transmission .
File Info
Filename | shiftLogic-sequentialGearbox.lua |
Path | /lua/vehicle/controller/shiftLogic-sequentialGearbox.lua |
Usage type | Specific to vehicleController |
JBeam Properties
number
type
2000
default
Minimum RPM for the auto clutch to start a launch behavior
When using arcade mode or clutch assist.
number
type
3000
default
The RPM the auto clutch tries to maintain during the launch behavior.
When using arcade mode or clutch assist.
Public Functions
Function name
Parameters
Description
Function name
gearboxBehaviorChanged
Parameters
behavior
Description
Switches between arcade and realistic gearbox modes.
Function name
shiftUp
Parameters
Description
Shifts the transmission up one gear.
Function name
shiftDown
Parameters
Description
Shifts the transmission down one gear.
Function name
shiftToGearIndex
Parameters
index
Description
Shifts the transmission to the selected gear.
Function name
getGearName
Parameters
Description
Returns current gear index
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": {
"calculateOptimalLoadShiftPoints": true,
"shiftDownRPMOffsetCoef":1.20,
"aggressionHoldOffThrottleDelay":3,
"lowShiftDownRPM":[0,0,0,2000,2200,2200,2200,2200],
"lowShiftUpRPM":[0,0,3900,3800,3700,3700,3700],
"clutchLaunchStartRPM": 3000,
"clutchLaunchTargetRPM": 2000,
"ignitionCutTime": 0.09
},