Skip to content

Commit

Permalink
Fix TCC Absorbed power calc
Browse files Browse the repository at this point in the history
  • Loading branch information
rnd-ash committed Mar 23, 2024
1 parent 77ec2f2 commit b308273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torque_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void TorqueConverter::update(GearboxGear curr_gear, GearboxGear targ_gear, Press

this->engine_output_joule = sensors->engine_rpm * (abs(sensors->static_torque)) / 9.5488;
if (likely(sensors->engine_rpm >= sensors->input_rpm)) {
int rpm_as_percent = (float)sensors->input_rpm / (float)sensors->engine_rpm;
float rpm_as_percent = (float)sensors->input_rpm / (float)sensors->engine_rpm;
this->absorbed_power_joule = this->engine_output_joule - (this->engine_output_joule * rpm_as_percent);
} else {
this->absorbed_power_joule = 0;
Expand Down

0 comments on commit b308273

Please sign in to comment.