PxVehicleAutoBoxUpdate#

Defined in include/vehicle2/drivetrain/PxVehicleDrivetrainFunctions.h

void PxVehicleAutoBoxUpdate(
const PxVehicleEngineParams &engineParams,
const PxVehicleGearboxParams &gearboxParams,
const PxVehicleAutoboxParams &autoboxParams,
const PxVehicleEngineState &engineState,
const PxVehicleGearboxState &gearboxState,
const PxReal dt,
PxU32 &targetGearCommand,
PxVehicleAutoboxState &autoboxState,
PxReal &throttle,
)#

Note

The autobox will not begin a gear change if a gear change is already ongoing.

Note

The autobox will not begin a gear change until a threshold time has lapsed since the last automated gear change.

Note

A gear change is considered as ongoing for as long as PxVehicleGearboxState::currentGear is different from PxVehicleGearboxState::targetGear.

Note

The autobox will not shift down from 1st gear or up from reverse gear.

Note

The autobox shifts in single gear increments or decrements.

Note

The autobox instantiates a gear change by setting PxVehicleCommandState::targetGear to be different from from PxVehicleGearboxState::currentGear

Parameters:
  • engineParams[in] specifies the engine configuration.

  • gearboxParams[in] specifies the gear ratios and the time required to complete a gear change.

  • autoboxParams[in] specifies the conditions for switching gear.

  • engineState[in] contains the current angular speed of the engine.

  • gearboxState[in] describes the current and target gear.

  • dt[in] is the time that has lapsed since the last call to PxVehicleAutoBoxUpdate.

  • targetGearCommand[inout] specifies the desired target gear for the gearbox. If set to PxVehicleEngineDriveTransmissionCommandState::eAUTOMATIC_GEAR, the value will get overwritten with a target gear chosen by the autobox.

  • autoboxState[out] specifies the time that has lapsed since the last automated gear change and contains a record of any ongoing automated gear change.

  • throttle[out] A throttle command value in [0, 1] that will be set to 0 if a gear change is initiated or is ongoing.