mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
energy counter for electric traction vehicles
This commit is contained in:
@@ -257,7 +257,7 @@ void ui::vehicleparams_panel::render_contents()
|
||||
|
||||
std::snprintf(
|
||||
buffer.data(), buffer.size(),
|
||||
STR_C("Forces:\n tractive: %.1f, brake: %.1f, friction: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]"),
|
||||
STR_C("Forces:\n tractive: %.1f, brake: %.1f, friction: %.2f%s\nAcceleration:\n tangential: %.2f, normal: %.2f (path radius: %s)\nVelocity: %.2f, distance traveled: %.2f\nPosition: [%.2f, %.2f, %.2f]"),
|
||||
// forces
|
||||
mover.Ft * 0.001f * ( mover.CabActive ? mover.CabActive : vehicle.ctOwner ? vehicle.ctOwner->Controlling()->CabActive : 1 ) + 0.001f,
|
||||
mover.Fb * 0.001f,
|
||||
@@ -277,6 +277,9 @@ void ui::vehicleparams_panel::render_contents()
|
||||
|
||||
ImGui::TextUnformatted(buffer.data());
|
||||
|
||||
std::snprintf(buffer.data(), buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
|
||||
ImGui::TextUnformatted(buffer.data());
|
||||
|
||||
draw_mini(mover);
|
||||
|
||||
if (ImGui::Button(STR_C("Radiostop")))
|
||||
|
||||
Reference in New Issue
Block a user