Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 71f14025 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

more verbose logging in driver model

parent 3f0e21c0
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox
} catch (VectoException) {
Log.Error("{0} - Failed to interpolate in TransmissionLossMap. angularVelocity: {1}, torque: {2}", GearName,
inAngularVelocity, outTorque);
return outTorque / _ratio;
}
}
......
......@@ -74,7 +74,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IResponse Request(Second absTime, Meter ds, MeterPerSecond targetVelocity, Radian gradient)
{
VehicleStopped = false;
Log.Debug("==== DRIVER Request ====");
Log.Debug("==== DRIVER Request (distance) ====");
Log.Debug(
"Request: absTime: {0}, ds: {1}, targetVelocity: {2}, gradient: {3} | distance: {4}, velocity: {5}, vehicle stopped: {6}",
absTime, ds, targetVelocity, gradient, DataBus.Distance, DataBus.VehicleSpeed, VehicleStopped);
......@@ -93,7 +93,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IResponse Request(Second absTime, Second dt, MeterPerSecond targetVelocity, Radian gradient)
{
VehicleStopped = true;
Log.Debug("==== DRIVER Request ====");
Log.Debug("==== DRIVER Request (time) ====");
Log.Debug(
"Request: absTime: {0}, dt: {1}, targetVelocity: {2}, gradient: {3} | distance: {4}, velocity: {5} gear: {6}: vehicle stopped: {7}",
absTime, dt, targetVelocity, gradient, DataBus.Distance, DataBus.VehicleSpeed, DataBus.Gear, VehicleStopped);
......@@ -720,9 +720,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
retVal.SimulationInterval = ds / currentSpeed;
return retVal;
}
Log.Error("vehicle speed is {0}, acceleration is {1}", currentSpeed.Value(), acceleration.Value());
Log.Error("{2}: vehicle speed is {0}, acceleration is {1}", currentSpeed.Value(), acceleration.Value(),
DataBus.Distance);
throw new VectoSimulationException(
"vehicle speed has to be > 0 if acceleration = 0! v: {0}, a: {1}", currentSpeed.Value(), acceleration.Value());
"vehicle speed has to be > 0 if acceleration = 0! v: {0}, a: {1}, distance: ", currentSpeed.Value(),
acceleration.Value(), DataBus.Distance);
}
// we need to accelerate / decelerate. solve quadratic equation...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment